Test fundamentals ·
Test Metrics: Which to Track and Which to Ignore
By The QAcademy team

The dashboard shows 1,200 test cases executed, a 96% pass rate and code coverage trending up. Management is happy, and then a critical defect reaches production the following week. The numbers were accurate; they just weren't measuring what mattered.
In this article you'll learn how to pick test metrics that support decisions, how to spot the ones that flatter without informing, and how to keep your team from optimizing the number instead of the quality.
Test metrics: what they are really for
A test metric isn't a result, it's a decision tool. Before tracking one, ask yourself three questions:
- Which decision should this number inform (ship or not, where to spend test effort, what to automate)?
- Who reads it, and what will they do if it changes?
- How could it be improved without improving real quality?
If you can't answer the first one, the metric is decoration. The third is the most important: it protects you from Goodhart's law, usually summed up as "when a measure becomes a target, it ceases to be a good measure" (as phrased by Hillel Wayne). A metric is an indirect indicator of what you care about; turn it into a target and you risk drifting away from the goal.
The metrics worth tracking
Here are five indicators that are useful in most teams. None is magic, and each must be read in context.
| Metric | What it tells you | Caveat |
|---|---|---|
| Defects escaped to production | What your tests missed, relative to what was found before release | Split by severity; a raw count says little |
| CI feedback time | How fast a developer learns something broke | Measure real elapsed time, not the theoretical duration |
| Flaky test rate | How much you can trust red/green results | Read it alongside the causes of flaky tests |
| Defects per functional area | Where to focus testing and refactoring | Normalize by area size or criticality |
| Risks covered by tests | Whether high-stakes areas are protected | Needs a risk list that is kept up to date |
Escaped defects
This is the indicator closest to what users experience. A simple way to express it is the share of defects found after release among all known defects over a period. Be careful: the figure depends on the observation window (defects surface late) and on severity. Two critical defects weigh more than twenty typos.
Feedback time
A test run that takes 40 minutes gets triggered less often, so it corrects less quickly. That time directly shapes team behavior, which is why it deserves tracking. It is often fixed through the structure of your suite, as explained in the test automation pyramid.
Problem areas
Counting defects per module or feature reveals clusters: a payment screen producing half the bugs deserves more tests and maybe a redesign. This is not a ranking of developers and must never be used as one.
An illustrative scenario: the dashboard that reassures wrongly
Imagine a fictional claims management application. The team tracks three figures: test cases executed, pass percentage and code coverage. All three are green.
Yet after every release, support receives tickets about refund calculations. Looking closer, most tests check screens and error messages, while the calculation rules, which are riskier, have only a handful of cases. The numbers measured activity, not protection.
The team decides to change the question. Instead of "how many tests pass?", it asks "which risks are covered, and what escapes to production?". It lists the five most sensitive business rules, checks which ones have tests and tracks escaped defects per area. The dashboard becomes less flattering and far more useful.
Metrics to handle with care (or ignore)
These numbers aren't forbidden, but they mislead when taken as a measure of quality. A Thoughtworks article by Srinivas Murty and Sudarshan Gorur questions exactly this kind of indicator.
- Number of test cases written or executed. It describes a volume of activity. A product can be solid with few tests and fragile with many.
- Number of defects found, on its own. It reflects what was looked for, not what exists. A low figure can mean good quality or tests looking in the wrong place.
- Code coverage as a target. Useful for spotting areas never executed, but dangerous as a goal: you can reach a high percentage with tests that verify almost nothing.
- Tester-to-developer ratio. It says how many people work, not what they protect.
A practical rule: a metric that measures effort (tests written, hours spent) tells you about workload; a metric that measures effect (escaped defects, feedback time) tells you about quality. Favor the second family.
Computing your indicators (TypeScript)
You don't need a complex tool to start: an export from your issue tracker is enough. A short example with made-up data:
type Defect = {
id: string;
severity: "critical" | "major" | "minor";
foundIn: "test" | "production"; // where the defect was detected
};
// Share of defects found in production among all known defects
function escapeRate(defects: Defect[]): number {
if (defects.length === 0) return 0; // avoid dividing by zero
const escaped = defects.filter((d) => d.foundIn === "production").length;
return escaped / defects.length;
}
const sample: Defect[] = [
{ id: "D-1", severity: "major", foundIn: "test" },
{ id: "D-2", severity: "critical", foundIn: "production" },
{ id: "D-3", severity: "minor", foundIn: "test" },
{ id: "D-4", severity: "minor", foundIn: "test" },
];
// 1 defect out of 4 escaped: 25%
console.log(`${(escapeRate(sample) * 100).toFixed(0)}%`);
// So a critical defect isn't drowned in the average, also look at severity
const criticalEscaped = sample.filter(
(d) => d.severity === "critical" && d.foundIn === "production",
);
console.log(`Critical defects escaped: ${criticalEscaped.length}`);
Compute the figure over a fixed period (per release, for example), keep the same definition from one period to the next and note the context: a large release isn't comparable to a hotfix.
Presenting metrics without letting them drift
- Pair two numbers that check each other, for example CI feedback time and escaped defects. Improving one while degrading the other should be visible.
- Write the definition next to the number: what is counted, the period, the source.
- Always comment: a figure with no interpretation invites every misreading.
- Don't tie metrics to individual evaluation: as soon as you do, people optimize the number. Hillel Wayne points out that even honest pursuit of a metric can hurt the real goal when the gap between measure and value is large.
- Review the list: a metric that hasn't triggered any decision in three months is a candidate for removal.
Key takeaways
- A test metric exists to support a decision: with no decision behind it, it is useless.
- Favor effect indicators (escaped defects, feedback time, instability) over effort indicators (number of tests).
- Any number that becomes a target gets distorted: plan how it could be "improved" without a quality gain.
- Attach to every figure its definition, its period and a comment.
- Start small: three well-understood metrics beat fifteen on display.
FAQ
What are the most important software testing metrics?
There is no universal list, but escaped defects, CI feedback time, flaky test rate and defect distribution by area cover most needs. Choose the ones that inform a decision your team really has to make.
Is code coverage a good metric?
It helps spot areas never executed by tests, which is useful. It becomes misleading when turned into a numeric goal, because it doesn't prove that tests verify anything. Use it as a signal, not a target.
How do you measure test effectiveness?
Look at what the tests didn't catch: defects found after release, their severity and the area concerned. Add feedback time and suite reliability. No single number is enough: combine them and explain them.
Sources
- Questionable metrics for measuring product quality, Thoughtworks
- Goodhart's Law in Software Engineering, Hillel Wayne
What's next?
Want to see where you stand on test design and quality steering? Take the free diagnostic: 10 questions, about 5 minutes. And if you'd rather follow new articles by email, QAcademy sends a weekly newsletter (at most one email a week, one-click unsubscribe).
Take the next step
You have just read. Now see where you stand: 10 questions, your score chapter by chapter, free and without signing up.
Take the free test (5 min)Already decided to practise?
- Complete Pack, €149 : the full course (5 chapter sheets, 9 labs), the chapter quizzes, plus the mock exams
- Exam Pack, €39 : 2 full mock exams, with a detailed review of every option
One-off payment, no subscription, refunded within 14 days if it is not for you.
Get the new articles by email
At most one email a week: the new QAcademy articles on software testing and quality. Free, unsubscribe in one click.