Defect leakage

Defect leakage is the share of defects that a test phase should have caught and did not, measured by counting the defects found in later phases or in production that were already present when the phase ran. It is reported per phase, such as system testing or user acceptance testing, and a lower figure means the phase filtered more.

The longer version

Two numbers are needed for one phase: the defects the phase found, and the defects found afterwards that it could have found. Take a release whose system testing logged 36 defects. User acceptance testing then found 3 more that were already in the build, and 1 surfaced in production in the following month, so 4 leaked from system testing. Sources do not agree on the denominator. One version divides the leaked defects by everything that was there to be found: 4 divided by 36 plus 4 is 4 over 40, or 0.1, one defect in ten. The other divides by the phase's own catch: 4 over 36, about 0.11, one in nine. The gap between the two widens as leakage rises, so a figure can be compared only with others calculated the same way, and a report should say which version it uses. Either result is commonly multiplied by 100 and quoted as a percentage.

Leakage is one of several measures built on the same events. An escaped defect is a single bug that got past every check and was found in production, and leakage is a proportion. Counted for one phase, it also takes in the defects a later phase caught before release: four leaked from system testing in the example, and one of them escaped. The ISTQB glossary defines defect detection percentage as the number of defects found by a test level, divided by the number found by that test level and any other means afterwards. That is the share caught, so leakage in its first form is one minus it: 36 over 40 is 0.9, and 0.9 plus 0.1 accounts for every defect. Defect removal efficiency is the same ratio drawn around the whole pre-release process instead of one phase, with production as the only thing that comes afterwards. In the example 39 of the 40 defects were found before release, so removal efficiency is 0.975 and leakage at the release boundary is 1 over 40, or 0.025. Measured there, with the total as its denominator, leakage is exactly the complement of defect removal efficiency. The second form of the formula is not.

The view by phase is what the measure adds. A team that only counts production bugs learns that something leaked. A team that records, for each late defect, the earliest phase that could have caught it learns where. That attribution is a judgement and has to be made honestly. A defect that depends on production data volumes was never visible to system testing and does not count against it, and neither does a fault introduced by a change made after the phase closed. The figure also depends on what was logged. If testers fix small things without filing them, the phase's catch is understated and leakage looks worse. If late defects are relabelled as change requests, it looks better. Duplicate, invalid and rejected reports come out of the phase's count before dividing, and a production defect that turns out to date from an earlier release counts against that release, not the current one. The number is provisional until the later phases have had time to find things, so it is calculated once the window agreed for the release has closed. A phase that leaks more than it used to is the cue to look at its coverage, its test data and its entry criteria.

Common questions

What is defect leakage in software testing?

Defect leakage in software testing is the proportion of defects that passed through a test phase undetected and were found later, in a subsequent phase or in production. The measure is taken per phase and counts only defects that were present, and detectable, when that phase ran. A low value means the phase is catching most of what reaches it.

How is defect leakage calculated?

Count the defects found after a phase that the phase should have caught, and divide either by the total of those plus the defects the phase found, or by the phase's own defects alone. With 6 leaked and 24 found, the first method gives 6 over 30, which is 0.2, and the second gives 6 over 24, which is 0.25. State the method beside the result.

What is the difference between defect leakage and an escaped defect?

An escaped defect is one bug: a specific fault that was in the release when it shipped and was found in production. Defect leakage is a ratio. For a whole release it counts the escapes, and for a single phase it also counts the defects a later phase caught before release. The escape is what gets investigated and fixed, and the leakage figure shows whether misses are becoming more or less frequent.

How does defect leakage relate to defect removal efficiency?

Defect removal efficiency is the share of a release's defects found before shipping, and defect leakage at the release boundary is the share found after. When leakage is calculated against the total of both counts, the two add up to one. Leakage can also be reported for a single test phase, a level of detail that removal efficiency for the whole release does not give.

What is an acceptable defect leakage rate?

An acceptable rate is one the team sets for itself, since the figure depends on the formula used, on how carefully each phase logs its defects and on how long later phases are given to find more. A leaked cosmetic fault and a leaked data-loss bug count the same in the ratio, so leakage of high-severity defects is worth tracking separately, and the trend between releases says more than one value.

How do you track defect leakage?

Add two fields to every defect in the tracker: the phase that found it and the earliest phase that could have found it, plus the release it belongs to. Leakage per phase is then a filtered count once the release's observation window closes. A list of the leaked defects, reviewed with developers and testers, is often worth more than the ratio itself.

What causes defect leakage and how is it reduced?

The usual causes are unclear or changing requirements, test cases that skip negative paths and edge cases, unrealistic test data, a test environment that differs from production and time pressure at the end of a phase. Each leaked defect points at one of them, so the remedy is specific: a reviewed requirement, an added case, a better data set or a closer match between environments.

Bug reports that arrive ready to triage.

Collect replay, console, network and browser context with the Free plan.

<script src="…/widget.js" data-key="pb_pub_…">