23 / 62 · 22 Test Strategy & Quality Metrics · Test Automation Strategy← prev⊞ allnext →☰ Read as one page
3.6Automation Maintenance: The Hidden Cost
The Maintenance Tax
For every hour spent writing automation, budget 0.3-0.5 hours per year for maintenance. A suite of 500 automated tests written over 2 years requires roughly 150-250 hours of maintenance per year.
Sources of Maintenance Burden
| Source | Impact | Mitigation |
|---|---|---|
| UI changes | Selectors break, page flow changes | Use resilient selectors (data-testid), page object model |
| API changes | Response format changes, new fields, removed endpoints | Contract tests that catch changes early |
| Test data staleness | Hardcoded IDs break when data changes | Test data factories, API-driven data creation |
| Flaky tests | Time spent investigating false failures | Quarantine, root-cause analysis, auto-retry with limits |
| Framework updates | Breaking changes in test framework | Pin versions, schedule upgrade sprints |
| Environment drift | Test environment diverges from production | Infrastructure-as-code, automated environment provisioning |
The Maintenance Quadrant
Periodically review your test suite and categorize each test:
| Passes Consistently | Fails Intermittently | |
|---|---|---|
| High Value (critical path, high-risk area) | Keep and maintain | Fix immediately |
| Low Value (edge case, low-risk area) | Keep but deprioritize maintenance | Delete or convert to manual |
Tests in the bottom-right quadrant (low value, flaky) should be deleted. They consume maintenance effort without providing proportional quality assurance.