← newsletter
Issue 5

Green Is Not Checked: Passing Runs That Tested Nothing

Fifteen new posts on passing results that hide what the run did not check, led by 100% coverage with an 18.42% mutation score and 16 of 66 silent failures.

A pass is a claim

Issue 4 asked what a suite still notices after the UI changes. The posts since then ask the same thing of the signals around the suite: the exit code, the coverage figure, the flaky count, the report. Over and over, a green result turned out to say less than it seemed to.

The two results below are the clearest. The rest are in brief.

100% coverage, 18.42% mutation score

I wrote three test suites for one small retry module. All three reached 100% line and branch coverage. Their mutation scores, from StrykerJS 10.1.1 and 38 mutants:

SuiteWhat the tests checkCoverageMutation score
runs-onlya result came back100%18.42%
type-checkstype, range, throws100%34.21%
exact-valuesexact result at each boundary100%100%

Coverage gave the same number for all three. The mutation score separated them. In the two weak suites, 21 of 22 shouldRetry mutants survived, including one that made every status, 404 included, say "retry". Details: 100% Coverage, 18.42% Mutation Score.

Two follow-ups apply it to a real library, unjs/ufo:

16 of 66 runs returned wrong data and reported success

I changed an orders page in 10 ways and ran 3 AI-generated Playwright tools against each version, with a repair loop. In 16 of 66 runs the tool returned wrong data with no error. The repair loop never saw them, because it only starts on an error.

ArmCorrectLoudSilent
Generated, with repair45516
+ schema check46713
+ checks against the page5880

A schema check caught only the 3 runs with totals of 0. Four checks against the page caught the rest. The silent runs came mostly from code that prefers a value to an error, such as a timeout turned into an empty list. Details: AI-Generated Playwright Tools: 1 in 4 Runs Returned Wrong Data With No Error.

The rest, in brief

One question to take into your week

"Which of our green checks would still be green if the thing it guards did nothing?"

Pick one. Break the thing it guards on purpose, once, and see whether it goes red.

Stay connected

Gary Parker Quality Architect & Strategic Advisor

Enjoy this issue?

Subscribe to get future issues delivered straight to your inbox.