Notes
Detection
First, can the tests catch bugs at all? Coverage cannot answer that; planted bugs can. ShopRung's suites caught fourteen of its seventeen planted bugs, eighty two percent, and the three misses are named. It works like a mutation score for the whole product. Track it when tests or the product change, and add a planted bug, or a mutant, for every real bug you fix.
ShopRung, 17 planted bugs, 5 suites + load tests: caught by at least one: 14 rate: 14 / 17 = 82% missed: rounding, name length, slow chat like mutation score, for the whole product
Escapes
Second, escapes: bugs found after release, divided by all bugs found for that release. Count them by severity, because ten cosmetic escapes matter less than one money bug. The useful part is not the rate but the question each escape asks: which test should have caught this, and why did it not? ShopRung's off topic refusal bug, found by the red team after the chat shipped, is an escape: its review gave a new test and a fix.
- escapes = bugs found after release / all bugs found for that release
- count by severity, not just totals
- every escape: which test should have caught it?
- ShopRung example: the role-play refusal bug, found by the red team after the chat shipped
Flakiness
Third, flakiness: tests that fail without a code change. We ran ShopRung's API suite twenty times and the UI suite ten times: five hundred and thirty test runs, zero flaky. But the same API suite run with four parallel workers failed two, four and five of twenty three tests, because tests shared data, and the lab seven suite passed only two of ten runs in random order. Flakiness depends on how you run tests, so measure it the way CI runs them.
API suite x 20 runs: 460 test runs, 0 flaky UI suite x 10 runs: 70 test runs, 0 flaky API suite, 4 workers in parallel: 2, 4 and 5 of 23 failed (shared data) lab 7 suite, random order: 2 of 10 runs passed
Feedback time
Fourth, feedback time: how long a developer waits to learn whether a change broke something. ShopRung's pull request suites took about seven seconds: the API suite under two, the UI suite under four, the AI suites on the fake model under one. On real projects, track the median and the ninety fifth percentile of the whole CI job. When feedback takes too long, people merge without waiting, and every other metric decays.
API suite 1.6 to 2.0 s UI suite 3.7 to 3.9 s AI suites, fake model < 1 s total about 7 s on a laptop track the p50 and p95 of the whole CI job, not one suite slow feedback → people stop waiting for it
DORA
DORA, from the DevOps Research and Assessment program, measures delivery with four metrics. Two for throughput: how often you deploy, and how long a change takes from commit to production. Two for stability: the share of deployments that cause a failure in production, and how long it takes to restore service. Testers influence all four: fast reliable suites raise throughput, and good tests lower the change failure rate.
- throughput: deployment frequency lead time for changes (commit → production)
- stability: change failure rate time to restore service
- measured from deploys, incidents and Git, per team
Compute them
You can compute them from data that already exists. Deployment frequency from the deploy jobs in CI. Lead time as the median from a commit's time to the deployment that shipped it. Change failure rate as deployments that caused an incident or rollback, divided by all deployments. Time to restore as the median from an incident opening to its resolution. Compare a team with itself over time, never teams with each other.
deployment frequency: CI deploy jobs per week lead time: commit time → deploy time, median change failure rate: incidents or rollbacks / deployments time to restore: incident opened → resolved, median
Gaming
Every metric can be gamed. Test counts rise by splitting tests. Coverage rises with tests that assert nothing. Pass rate rises by quarantining failures. Bug counts rise with duplicates, and escapes fall when bugs are renamed feature requests. Pair each metric with a counter metric: pass rate with the number of quarantined tests, coverage with the mutation score, speed with the change failure rate.
- test count: split tests, test nothing new coverage %: tests without assertions
- pass rate: quarantine or skip the failures
- bugs found: report duplicates
- escapes: reclassify bugs as "feature requests"
- fix: pair each metric with its counter-metric
A dashboard
A practical dashboard has few numbers. Escape rate by severity. Detection, as a planted bug or mutation score. Flaky tests: how many, and how long they have sat in quarantine. Pull request feedback time at the ninety fifth percentile. And the four DORA metrics. Each needs an owner, a target, a trend, and the decision it drives, or it will be watched by no one.
- escape rate by severity
- planted-bug or mutation score
- flaky tests: count and age in quarantine
- PR feedback time, p95
- DORA four, per team
- each: an owner, a target, a trend, and the decision it drives
Common mistakes
Mistakes. Counting tests or bugs as if more were better. Making coverage the goal. Measuring flakiness in a different way from how CI runs the tests. Comparing teams with each other using DORA. Collecting metrics that change no decision. And setting targets so hard that hitting the number becomes the job, instead of quality.
- counting tests or bugs
- coverage as the goal
- flakiness measured one way, CI run another
- comparing teams with DORA
- metrics without decisions
- targets that become the job
Say it like this
In the interview: escaped bugs by severity, with a review of each one. A detection score from planted bugs or mutants: on our shop, the suites caught fourteen of seventeen. Flaky tests and how long they sit in quarantine, measured the way CI runs them. Pull request feedback time. And the DORA metrics per team, over time. Each paired with a counter metric so it cannot be gamed.
- "Escapes by severity, and a review of each one. A planted- bug or mutation score: our suites caught 14 of 17. Flaky
- tests and quarantine age, run
- the way CI runs. PR feedback
- time. And DORA per team. Each paired with a counter-metric so it cannot be gamed."