Is the output of good enough quality?

Quality Confidence folds three questions that every release review asks into one number that can be trended:

A release scores high when its in-scope requirements are covered and their tests keep passing. It scores low when coverage is thin, or when tests fail repeatedly, or when they flicker. Because it is calculated from test results that already exist, it costs almost nothing to collect, and because it is calculated before release, it is a lead indicator, unlike escaped bugs, which arrive after the damage.

The H-Model gives it somewhere to live. The requirements stack maps explicitly onto the stack of Definitions of Done, so Quality Confidence can be calculated independently at each level: for a team’s stories against “developed”, for a product’s Integration Scenarios against “integration tested”, for a programme’s features against “business accepted”. It can also serve as a gate: a Release does not move into the next pipeline stage until its Quality Confidence at the current level clears a bar the Product Forum agreed.

How to calculate it

Start with the requirements in scope for the current release, and only those. Quality Confidence for a release that is still half-built should reflect the half that is being built, not the whole backlog.

For each in-scope requirement:

  1. Coverage. Decide whether the requirement has enough tests. This is a judgement, flagged by the team, not a computed line-coverage figure. A requirement may be in scope and hard to test, or may be a historic source of fringe cases, and the team may rightly say its testing is not yet adequate. Record that as a coverage factor: 1 for enough, 0 for not enough (or a fraction if you want to be gentler). A requirement with no tests at all is 0, whatever else is true.
  2. Stability. Take the pass rate of the requirement’s tests in each of the last n runs, newest first. Combine them with a weighted moving average so that the latest run counts most and the oldest kept run counts least. With n = 3 and weights 3, 2, 1, stability = (3 × latest + 2 × previous + 1 × oldest) / 6. A test that failed its last five runs and passed this morning does not get to claim stability. We recommend starting at three runs and tuning by test frequency and risk.
  3. Missing runs. If the tests were not run in one of the last n runs, do not carry the old result forward unchanged. Multiply the requirement’s stability by 0.8 for each missing run. A pass last month is not a pass today.
  4. Requirement confidence = coverage × stability.

Then the release’s Quality Confidence is the mean of the requirement confidences, or a weighted mean if some requirements matter more. One hundred per cent is only reachable when every in-scope requirement is adequately covered and every test has passed in all of the last n runs.

Quality Confidence for a release: coverage times stability, averaged over in-scope requirements (worked example)Release: 64%mean of six in-scope requirementsR1: 100%cov. x stab.enough: yes100% pass100% pass100% passstability 100%R2: 93%cov. x stab.enough: yes100% pass80% pass100% passstability 93%R3: 100%cov. x stab.enough: yes100% pass100% pass100% passstability 100%R4: 43%cov. x stab.enough: yes60% pass30% pass20% passstability 43%R5: 50%cov. x stab.enough: yes20% pass70% pass100% passstability 50%R6: 0%cov. x stab.enough: NO100% pass100% pass100% passstability 100%CoverageRun nRun n-1Run n-2Weightedhistory cut-off: older runs do not countStability = (3 x latest + 2 x previous + 1 x oldest) / 6. R2: (300 + 160 + 100) / 6 = 93%. R4: (180 + 60 + 20)/ 6 = 43%. R6 passes everything but is flagged as under-tested, so it scores 0 and drags the release to 64%.Fix the coverage and the release jumps to 81%.A skipped run multiplies the requirement's stability by 0.8 per missing run: a pass last month is not a pass today.
A worked example with six in-scope requirements and three kept test runs. Each requirement scores coverage times weighted stability; the release is their mean. R6 passes everything but is flagged as under-tested, so it scores zero.

Walking through the example: R1 and R3 pass everything and are adequately covered, so they score 100 per cent. R2 passed, dipped to 80 per cent, passed again: (300 + 160 + 100) / 6 = 93 per cent. R4 is improving but was failing badly two runs ago: (180 + 60 + 20) / 6 = 43 per cent. R5 is going the wrong way, with the latest run at 20 per cent: (60 + 140 + 100) / 6 = 50 per cent. R6’s tests all pass, but the team has flagged that the requirement does not have enough of them, so coverage is 0 and so is the score. The release scores (100 + 93 + 100 + 43 + 50 + 0) / 6 = 64 per cent. Had R6 been properly covered the release would score 81 per cent, which tells the Product Forum exactly where the cheapest improvement is.

Calibrating the parameters (how many runs to keep, the decay for missing runs, the weights) can be done by correlating Quality Confidence against the lag measure of escaped bugs. In practice we found that tuning anything other than the coverage judgement made little difference to the scores. The coverage judgement is where the honesty lives.

A simpler version

If you do not have tests linked to requirements, first ask whether you are testing the right things. Then, if you must, simplify: drop the coverage factor, have the team assert a coverage level, and calculate stability over the test suite as a whole. It is weaker, because it cannot tell you that an in-scope requirement has no tests, but it still rewards the right behaviour and still trends.

Last updated