Test maintenance cost is the time and effort required to keep tests correct, runnable, understandable, and aligned with the code they verify. Tests are code and therefore create ownership costs alongside their quality benefits. section 1.2
Assess upkeep cost through the work tests impose:
- Refactor tests when the underlying production code changes. section 1.2
- Run tests on each code change. section 1.2
- Investigate false alarms and spend time reading tests to understand application behavior. section 1.2
A test’s net value can approach zero or become negative when upkeep costs are high. Sustainable growth therefore depends on keeping tests that provide substantial quality value rather than increasing test count indiscriminately. section 1.2
Figure 1.2. The difference in growth dynamics between projects with good and bad tests. A project with badly written tests exhibits the properties of a project with good tests at the beginning, but it eventually falls into the stagnation phase.
Contrasts the growth dynamics of projects with good tests and projects burdened by badly written tests. section 1.2
