Quick reference
- Coverage shows what ran, not what was checked. Watch the trend, not a target.
- Flake rate counts tests that fail, then pass on a rerun with no code change.
- Runtime: keep the fast suite local and the full suite inside the merge window.
- Escaped defects: bugs found after release. The only number tied to outcomes.
Explained
Coverage is the first, and the most abused. Line coverage says a line ran, not that anything was checked. Use it to find untested code, never as a target: a team told to hit ninety per cent will write tests that execute lines and assert nothing.
Flake rate is the second. Count the runs that fail and then pass on a rerun with no code change, and divide by total runs. Track it weekly. A rising rate means people stop believing red, and the suite becomes advisory.
Runtime is the third. Measure the fast suite and the full suite separately, at the median and the ninety-fifth percentile. A unit suite that takes fifteen minutes locally will not be run locally.
Escaped defects is the fourth, and the only one tied to an outcome: bugs found after release, per change or per release. It is lagging, noisy and easy to argue about, which is why it is worth arguing about.
The honest caveat: every one of these can be gamed. Coverage invites assertion-free tests, flake rate invites deleting the flaky test, runtime invites cutting the slowest check. Measure them together or not at all.
Your turn: Which of the four does your team actually look at?
Related on this site
More notes: Testing & quality
- P1031Security tests every pipeline should run
- P1030Five accessibility checks before release
- P1029Load testing a design, not a number
- P1028Quarantine a flaky test, keep coverage
- P1026Test data you can trust
- P1025Tests in CI: lint, unit, contract, e2e, gate
- P1024Five test smells that hide bugs
- P1023Contract testing between services
Open in the notes app: search, filters, copy This note on GitHub