Test value estimates a test’s usefulness by multiplying scores for protection against regressions, resistance to refactoring, fast feedback, and maintainability. A zero in any attribute makes the estimate zero, so valuable tests must clear a meaningful minimum threshold. section 4.4 section 4.6
Use the metric to compare trade-offs rather than chase an ideal test:
- Maximize resistance to refactoring and maintainability; the principal trade-off is between regression protection and fast feedback. section 4.6
- Treat end-to-end tests as regression-protection specialists and unit tests as fast-feedback specialists; balance them through the Test Pyramid. section 4.6
- Keep tests only when their estimated value justifies their maintenance liability; a small set of valuable tests beats a large set of mediocre ones. section 4.4
Why implementation-focused tests lose value
A test that asserts the exact SQL string runs quickly and may catch query regressions, but schema or formatting refactoring can create false positives. A trivial property test resists refactoring and runs quickly, yet offers little regression protection. Prefer observable behavior and balance the attributes. section 4.4 section 4.6
Value estimate = [0..1] * [0..1] * [0..1] * [0..1]
Use the value-estimate formula as a compact reminder that every quality attribute contributes multiplicatively. section 4.4
