Test debt: outdated, missing, or low-quality tests. Like tech debt for tests.
Types of test debt:
- Missing tests for features.
- Stale tests for changed features.
- Flaky tests that don't reliably pass.
- Slow tests that bog down CI.
- Coverage gaps — areas without tests.
- Bad test data that breaks tests.
Identification:
- Test coverage report — see gaps.
- CI failure analysis — flaky tests obvious.
- Test execution time — slow tests cumulative.
- Pass rate trend — increasing failures = debt.
Strategies:
1. Test debt sprints.
- Quarterly dedicated time.
- Pay down accumulated debt.
- Fix flaky, add missing.
2. Per-feature commitment.
- Every new feature includes tests.
- Cleanup of related debt.
3. Quality gates.
- Coverage threshold.
- Pass rate requirement.
- Blocks new debt.
4. Continuous improvement.
- Each retrospective: identify test debt.
- Plan to address.
Prioritization:
- High-value debt first — tests for critical paths.
- Quick wins — flaky test fixes.
- High-cost debt later — comprehensive rewrite.
Common pitfalls:
- Ignoring debt — accumulates.
- All-at-once cleanup — disruption.
- No measurement — can't improve what you can't see.
Senior QA insight: test debt erodes test trust. When tests aren't reliable, everyone ignores failures.
The senior framing: healthy test suite is QA infrastructure investment. Without ongoing maintenance, it decays.
