Quality metrics that matter

Defect escape rate, flake rate, time-to-feedback, coverage trends per layer — and Goodhart traps (pass rate, raw test count). What you report to leadership.

About 21 min read3-question knowledge check

The mental model

Quality metrics are the instrument panel of a car you can't see out of, and most teams are staring at the wrong gauge. The tempting number — "95% of tests pass" — is the fuel gauge on a plane about to hit a mountain: reassuring and irrelevant. The metrics that predict whether quality is actually improving are the ones nobody puts on the dashboard because they're uncomfortable: how many bugs escaped to production, how often the suite lies (flakes), and how long a developer waits to find out they broke something.

The analogy that sticks: a metric is a shadow of the thing you care about, never the thing itself. You care about *product quality* and *fast, trusted feedback*; you can't measure those directly, so you measure shadows — escape rate, flake rate, time-to-feedback. The danger is Goodhart's Law: "when a measure becomes a target, it ceases to be a good measure." Target pass rate and people delete failing tests. Target test count and people write a thousand trivial assertions. Target code coverage and people write tests that execute lines without asserting anything. Every vanity metric has a cheap way to game it that makes the shadow look great while the real thing rots.

The one idea that separates a mature QA function from a box-ticking one: measure outcomes, not activity. "We ran 4,000 tests" is activity. "3 bugs reached production last quarter, down from 11" is an outcome. Leadership doesn't care how many tests you have; they care whether customers hit bugs, whether releases are safe, and whether the quality gate speeds the team up or slows it down. Report the outcome metrics, and use the activity metrics only as internal diagnostics.

The full lesson continues with 15 more sections
  • Deep dive
  • Internal architecture
  • Real-world use cases
  • Best practices
  • Common mistakes
  • Performance
  • Security
  • Production troubleshooting
  • Advantages & disadvantages
  • Alternatives
  • Interview expectations
  • Interview questions
  • Facts to remember
  • Cheat sheet
  • Quick revision