Notes from the post-mortem table. When a bug reaches production, the room usually spends ninety percent of its energy on the fix and ten on the question that pays off for years: why did we not catch this? I want to argue that the second question deserves more structure than a shrug and the phrase “we will add a test”.

A defect that was present in a release and found only after it left your control, by a customer, by support or by monitoring, is an escaped defect. Every one is evidence of a hole in your net. The job is to find the shape of the hole.

Start with a boring, specific timeline

Imagine an insurance renewal portal. Users aged 60 and above get a senior-citizen loading on premium, a rule configured by age band. After a release, customers aged exactly 60 are quoted the lower, younger rate. Revenue leaks for nine days before an actuary notices.

First, reconstruct facts: when was the faulty change made, in which commit, from which ticket? When did it enter each environment? When was it noticed, and by whom? Nine days between release and detection is itself a finding, because it points at monitoring as well as testing. No blame yet; just dates.

Ask which kind of gap it was

Most escapes fall into a handful of families. Naming the family tells you what to change. Here is the classification I find useful, and you may adapt it:

  • Requirement gap. The behaviour was never specified, or was specified ambiguously (“60 and above” versus “above 60”). Testing against the document would have passed.
  • Design gap. Nobody designed a test for this case. The scenario existed in the real world but not in the test suite.
  • Execution gap. A test existed and was skipped, deferred for time, or run and misjudged.
  • Automation gap. A script existed but its assertion was weak, or the test was disabled after being flaky.
  • Environment or data gap. It worked in test because data or configuration differed from production: a missing age band, a different time zone, a stub where a real service lives.
  • Change-impact gap. The release touched something unexpected, and regression selection missed the affected area.
  • Process gap. A hotfix went out without the normal checks, or a review was waived.

Back to the portal. Looking at the test suite shows a boundary case for age 59 and 61, but not 60. That is a design gap, and the ticket text said “above 60”, which the developer implemented literally while the product rule was “60 and above”. So there are really two causes: an ambiguous requirement, and a boundary test that skipped the boundary itself. One bug, two gaps. This happens constantly.

Use the five whys, but stop at something you can change

The five whys technique, asking “why” repeatedly, is fine as a prompt. Used lazily it ends at “human error”, which is useless, because you cannot patch a human. Push past it. Why did the tester not test 60? Because the boundary list was built from the ticket wording. Why was the ticket wording trusted? Because there is no step where the tester confirms rules with the product owner. That last answer is something you can change, with a small agreement: boundaries are confirmed before testing starts.

If your analysis lands on a person’s name rather than a mechanism, it is unfinished. Blameless does not mean consequence-free for repeated carelessness; it means the first assumption is that a reasonable person, under the same conditions, could make the same slip. Fix the conditions.

Turn the finding into one or two actions

Resist the urge to produce twelve actions. They will not all happen. Choose the smallest change that closes the family of gap. For the portal: add boundary tests at every age band edge (60 itself, not only its neighbours), and add a line to the refinement checklist asking whether each threshold is inclusive or exclusive. A third action, a dashboard check on average premium by age band after each release, covers the detection delay.

Also check whether the same bug can be sitting elsewhere. If one band edge was misread, are the others? Look at the neighbouring rules before closing the investigation. Bugs cluster, and a missed boundary rarely stands alone.

What a pile of these tells you

One escape is a story. Twenty classified escapes are data. Tally the families over a quarter. If most are requirement gaps, hiring more testers will barely help; the fix lives upstream, in refinement. If most are environment gaps, invest in test data and production parity. If most are change-impact gaps, your regression selection needs better information about what depends on what. This is the practical use of the defect removal efficiency idea: not merely a percentage, but a diagnosis of where the net is thin.

Be honest about limits. Small samples mislead; five escapes in a quarter do not make a trend. Severity matters, so weigh a data-loss bug above a cosmetic one rather than counting them equally. And classification is judgement. Two sensible people may label the same escape differently, which is acceptable as long as the labels are used for learning and not for scoring teams against each other. The moment the tally becomes a performance metric, people start labelling escapes as someone else’s gap.

Figures and names in the examples are illustrative.

Leave a Reply

Trending