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:
| Suite | What the tests check | Coverage | Mutation score |
|---|---|---|---|
| runs-only | a result came back | 100% | 18.42% |
| type-checks | type, range, throws | 100% | 34.21% |
| exact-values | exact result at each boundary | 100% | 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:
- Reading a Mutation Report: 1011 mutants, 82.59% on two runs, 176 undetected. Read the two scores per file first, then the mutator, then the line.
- Killing Survivors Without Chasing the Score: 31 tests in ufo's own style detect 62 of the 176 and move the score to 88.72%. The other 114 stay undetected, each with a written reason.
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.
| Arm | Correct | Loud | Silent |
|---|---|---|---|
| Generated, with repair | 45 | 5 | 16 |
| + schema check | 46 | 7 | 13 |
| + checks against the page | 58 | 8 | 0 |
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
- Finding flaky tests that fail every retry: a test failed 4 of 11 runs and Playwright's flaky count for it was 0 every time. Tracking results across runs marked it flaky at run 5.
- Playwright 1.65 and empty shards: a sharded run with no matching tests now fails every shard (16/16 at 16 shards, 0/16 on 1.64.1). A sharded
--last-failedafter a green run still exits 0. - Playwright 1.65 onlyFailures: the JSON report went from 3.05 MB to 158 KB at 20 failed tests. The totals shrank too, so a tool reading durations got 0 timings where the full report gave 1,980.
- MCP vs CLI token cost: MCP 0.0.85 and CLI 0.1.24 responses were within 25 tokens of each other.
findcut tokens 19x and 128x against a full snapshot in two tasks. --update-snapshotson an unstable page: 226 of 226 update runs passed and overwrote the baseline, on Playwright 1.40.0 to 1.65.1. Masking the animation's container stopped it.- Sharding with one merged HTML report: with one failing test, the merge job still ran and the report showed 16 passed and 1 failed, with a trace. Two settings make that work:
fail-fast: falseand!cancelled(). - Playwright WebMCP: tool calls passed 50 of 50, median 9.64 ms. Tools registered 50 ms late were missing from the first read in 50 of 50 runs, with no error.
- Code graph test selection:
code-review-graph impactcaught 236 of 237 seeded faults at 3.4% of suite time.vitest relatedcaught all 237 at 16.1%. - Writing a custom reporter: a reporter that counted failed results in
onTestEndreported 8 failures for a suite with 2 failing tests. - Running only affected tests on a pull request:
--only-changedcaught 13 of 27 broken tests and exited 0 with 0 tests run in 5 of 8 pull requests. A map with playwright-affected caught 27 of 27 and ran 67 of 96 tests. - Sharing traces safely: one sign-in test left the password in its trace 7 times. tracescrub removed every text copy, but it does not scan screenshots.
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
- Join the Discord community and bring the first green check you caught lying
- Want this thinking applied to your team? Workshops are open for registration
- The strategy essays and the experiments live in reading order at The AI-Era Quality Playbook
Gary Parker Quality Architect & Strategic Advisor
Enjoy this issue?
Subscribe to get future issues delivered straight to your inbox.