QA Interview Hub · Knowledge base · Quizzes · Українська

QA Fundamentals › Quality metrics

Which metrics are harmful and why?

Metrics become harmful when they turn into personal targets: by Goodhart's law, when a measure becomes a target it ceases to be a good measure. Bugs per tester leads to tiny bugs and duplicates, a 100% pass rate to skips and deleted tests, a coverage target to tests without asserts. Metrics describe the team and the process, each gets a counter-metric, and numbers are a prompt to ask why.

QA Fundamentals · Quality metrics

Bonuses depend on the number of bugs found. A quarter later there are twice as many, quality the same?

Management introduces a KPI: a tester who finds more bugs gets a higher rating. Within a quarter the number of tickets doubles, but developers complain about small and duplicated reports, and production has as many problems as before. The metric worked: the number grew. Only it stopped meaning what it was introduced for. This lesson is about why this happens, which metrics are harmful as targets and how to turn them into safe ones.

How it works and why. Goodhart's law in Marilyn Strathern's wording: when a measure becomes a target, it ceases to be a good measure. A metric is useful while it is a side effect of real behaviour: the number of bugs found usually correlates with the quality of testing. As soon as an assessment or a bonus depends on the number, people optimise the number, not the behaviour it was meant to reflect. Nobody has to cheat: it is a natural reaction to an incentive. A metric that is measured, not rewarded, stays honest, while a metric-target gets distorted.

How a metric-target stops working

Step 1The number becomes a target:the rating depends on its value Step 2People optimise the number:split bugs, duplicate cases Step 3The number grows, quality does not:conflicts, noise, lost trust
Figure 1. The chain is the same for bugs, test cases and coverage: only what gets inflated changes.

What unites harmful metrics is not that they are "bad" but that they are easy to manipulate and that they set people against colleagues or against the goal. Typical examples, with what is done to them and what replaces them:

Metric as a targetWhat people doWhat to use instead
Bugs found per personSplit bugs, file trivia and duplicatesTeam leakage + rejected rate
Number of test casesCopy-paste, duplicated casesShare of critical scenarios with tests
100% pass rateSkips, deleted tests, retriesFirst-attempt pass rate + number of skips
Code coverage ≥ 90%Tests without assertionsA threshold on new changes + mutation testing
Zero bugs in productionHiding, reclassifyingLeakage trend + recovery time

Vanity metrics deserve a separate mention: numbers that look good but lead to no decision (the total number of test cases, the number of tests executed per day without context). They are safe but useless, and they occupy the place on a dashboard that useful ones should occupy.

Example: what an inflated metric looks like in the data. A team introduced the KPI "bugs per tester". The result for the quarter:

A quarter before the KPI "bugs per tester" → a quarter after

bugs filed               120  →  210
rejected (not a bug/dup)  15% →  38%
average description     9 lines → 3 lines
leakage (Major+)          11% →  12%

More tickets, fewer useful ones, the same number missed.

The signs of gaming the number are visible in the accompanying metrics: the rejected share grew from 15% to 38% (many duplicates and trivia), the description shrank from nine lines to three (reproduction steps suffer), and leakage did not change. There are more tickets and no more value. The cure is not to forbid counting but three practices. First, metrics describe the team and the process, not an individual person. Second, every metric gets a counter-metric that catches distortion: the number of bugs together with the rejected rate, coverage together with mutation testing, speed together with the change failure rate. Third, a metric is used for questions ("why?"), not for verdicts.

The same number as a target and as a signal

Target

Bugs per person: rating and bonus

People split bugs, duplicate them, do not share findings and argue with developers about counts. The number grows, trust falls.

Signal

Team leakage and rejected rate: a retro conversation

The number describes the system. If it got worse, the team asks "why?" and changes the process instead of looking for a culprit.

Figure 2. The difference is not in the number itself but in what depends on it.

Limits and alternatives. This does not mean counting is forbidden. Individual numbers are fine for the employee themselves and for a 1:1, as material for a conversation that analyses reasons and does not rank people. Sometimes a number really must be a target, for example a regulator's requirement or an SLA: then it is accompanied by checks that make gaming impossible or visible. The alternative to a target metric is a range and a trend: "leakage stays within 5-12%, a sharp deviation is analysed". Transparency helps too: when a team knows how a number is calculated and why, it is less inclined to distort it. Finally, remember Campbell's law, close to Goodhart's: the more a social decision depends on an indicator, the more it is subject to corruption pressure and the more it distorts the process it was meant to track.

Common mistakes.

  • Making the number of bugs or cases found a KPI: it distorts behaviour and spoils relations with development.
  • Setting "zero bugs in production" as a personal goal for QA: bugs start to be classified as "not ours", and releases become slow out of fear.
  • Introducing a metric without a counter-metric: a skew to one side is not visible until it does harm.
  • Comparing teams or people by metrics with different context: complex modules always "lose".
  • Not explaining how a metric is calculated: people invent their own explanations, and trust falls.

Check yourself

A manager proposes: "coverage must be at least 90%, otherwise we do not merge the PR". Which distortions do you expect and what do you add?

Answer

Tests without assertions that execute lines, tests for trivial code and bypassing the rule with exclusions. I add a counter-metric of the quality of checks: mutation testing for critical logic or a review of assertions, and I keep the threshold on new changes, not as a global goal, and not tied to a person’s rating.

Why does "zero bugs in production" as a personal goal for QA do harm even though it looks reasonable?

Answer

Because QA cannot fully control it: defects are introduced by development, requirements and the process. A person defends themselves: classifies bugs as "not mine" or "not bugs", blocks releases out of fear. Such a goal measures fear, not quality. A team trend of leakage with an analysis of reasons works better.

In an interview. Junior: I am careful with metrics such as the number of bugs found or cases written as a KPI. By Goodhart’s law, when a metric becomes a target, people optimise the number and not quality: bugs get split, cases get duplicated. Middle/Senior: Metrics must describe the system and the process, not assess people. I attach a counter-metric that catches distortion (the number of bugs with the rejected rate, coverage with mutation testing), look at trends and ranges, and use the numbers as a reason to ask "why".

More articles in this chapter