Quality Metrics: Measuring and Improving Software Quality
Quality metrics provide objective data about software quality — enabling teams to understand current quality levels, track improvement over time, and prioritise quality investments. The right metrics create incentives for improvement; the wrong metrics create gaming and measurement theatre.
Defect Metrics
- Escaped defect rate: Defects found in production per release — the most direct measure of quality failure. Track trend over time.
- Defect density: Defects per unit of code (KLOC or function points). Enables comparison between components or teams.
- Defect resolution time: Time from defect discovery to fix in production. Measures responsiveness to quality issues.
- Defect reopening rate: Percentage of fixed defects that reopen — measures fix quality.
Process Quality Metrics
- Test coverage: Percentage of code executed by tests. Use as a floor, not a ceiling — 80% minimum, but meaningless without test quality.
- Code review coverage: Percentage of changes that received code review
- Build failure rate: Percentage of builds failing CI — indicates code quality discipline
Quality Health Indicators
- Static analysis violation trends — are technical debt indicators increasing or decreasing?
- Dependency vulnerability exposure — unpatched known CVEs in the dependency tree
- Test suite health — flaky test rate, coverage trends, suite execution time
Presenting Quality Data
Quality dashboards that update automatically and are visible to the whole team — including engineering leadership — create shared awareness and accountability. Trends matter more than point-in-time snapshots.