{"id":"04c6129d-11f7-4aa0-a809-1b972a0d7ef9","title":"Clear Test Boundaries","publishedOn":"2024-07-13","problem":"Badly defined test boundaries can lead to tests that are too broad, too narrow, or too fragile. This results in tests that are difficult to maintain, provide little value, or break easily.","description":"Defining test boundaries based on the functionality and responsibilities of a system, rather than its structural or architectural layers, leads to more meaningful, maintainable, and effective tests. ","ammerseValues":[{"name":"agile","delta":"0.5","rationale":"ability to adapt quickly to changes in functionality without being tightly coupled to system structure."},{"name":"minimal","delta":"0.2","rationale":"The positive impact is moderated slightly by the complexity introduced when compared to not testing at all or using simpler testing methods. The focus on functionality over structure means the minimalism value is positive but not substantial."},{"name":"maintainable","delta":"0.85","rationale":"The practice excels in maintaining system integrity by reducing test brittleness and supporting ongoing system evolution. The adjusted value reinforces this as a core benefit of the approach."},{"name":"environmental","delta":"0.1","rationale":"While the positive impact of aligning testing with functional needs is recognized, the challenges in getting a team to adopt this approach are reflected in a moderate positive impact."},{"name":"reachable","delta":"0.35","rationale":"The value increases due to the practice's alignment with practical goals and its potential to make tests more manageable. However, the complexity of initial setup and the need for familiarity with stubbing/mocking tools keep this value below higher-impact categories like Maintainable or Extensible."},{"name":"solvable","delta":"0.65","rationale":"The ability of this technique to solve problems effectively is reinforced, especially by focusing on relevant functionality and reducing test fragility."},{"name":"extensible","delta":"0.75","rationale":"The pattern significantly enhances extensibility by decoupling tests from specific structural elements of the system, focusing instead on functionality. This means that as the system grows or evolves, tests can be adjusted more easily without being tightly bound to the system's original structure."}],"categories":["software development"],"tags":["testing","trade-off","traceability","maintainability"],"links":[{"href":"https://patterns.sddevelopment.be/practices/04c6129d-11f7-4aa0-a809-1b972a0d7ef9","rel":"self","type":"GET"},{"href":"https://patterns.sddevelopment.be//practices/define_test_boundaries/","rel":"alternate","type":"GET"}],"relatedContent":[{"rel":"related","type":"GET","href":"https://patterns.sddevelopment.be/practices/336b0448-e78b-4428-83a5-d4d473afda63"},{"rel":"related","type":"GET","href":"https://patterns.sddevelopment.be/practices/1848f4a6-3acb-4dc8-aa49-e57a1b87cf3b"},{"rel":"related","type":"GET","href":"https://patterns.sddevelopment.be/concepts/6169f9c0-dfe0-49b1-b459-acf01ac69c40"},{"rel":"related","type":"GET","href":"https://patterns.sddevelopment.be/concepts/2eb8fcea-8f12-44d8-97c5-5a48013ae515"},{"rel":"related","type":"GET","href":"https://patterns.sddevelopment.be/concepts/49a014f5-e40b-4c80-ba64-a31626b955ca"},{"rel":"related","type":"GET","href":"https://patterns.sddevelopment.be/concepts/c8c57ad1-c7f0-49ff-8aa1-f37166f8f65d"}],"references":[{"rel":"appendix","type":"GET","href":"https://kentbeck.github.io/TestDesiderata/"},{"rel":"appendix","type":"GET","href":"https://patterns.sddevelopment.be/books/1925e2ec-9147-4c4a-9dd8-c3ce6d08eee6"},{"rel":"appendix","type":"GET","href":"https://patterns.sddevelopment.be/books/2930d42d-e7cf-4ea5-a6f3-eceb5b9a5fc1"},{"rel":"appendix","type":"GET","href":"https://patterns.sddevelopment.be/books/9d8ff83e-f49a-4c7c-8e40-e34ac63e2792"},{"rel":"appendix","type":"GET","href":"https://patterns.sddevelopment.be/books/a78d1c3f-6365-47ac-baa4-86c6371c1eed"},{"rel":"appendix","type":"GET","href":"https://www.goodreads.com/book/show/387190.Test_Driven_Development"},{"rel":"appendix","type":"GET","href":"https://www.linkedin.com/posts/adrianstanek_softwareengineering-communication-activity-7125755594849804290-s9II"},{"rel":"appendix","type":"GET","href":"https://www.industriallogic.com/blog/structure-shy-tests-with-lod/"}]}