A green test can be irrelevant
A test may exercise the same helper as production without challenging its dangerous behavior. Mutation checks reveal assertions that merely mirror the implementation or never reach the contested branch. Run them offline with fixtures rather than creating paid generations.
What to do next
- 01
Select consequential invariants
Choose a small set such as stale responses cannot overwrite current input, one approved action has one local command, and late completion cannot replace explicit selection. Tie each to a user-visible failure.
- 02
Introduce one controlled defect
In a temporary branch or test-specific substitute, disable exactly the guard that enforces the invariant. Avoid changing several behaviors simultaneously, because a failing test should reveal which protection it actually exercises.
- 03
Inspect the failure quality
Confirm a test fails for the intended business assertion, not a compilation error or unrelated timeout. Restore the code, rerun the relevant check and record any missing assertion exposed by the exercise.
A concrete example
Illustrative example: removing the selection revision check lets late result A replace chosen result B. The regression test must fail because the selected asset changed, demonstrating that it guards the user's choice rather than merely counting handler calls.
Before you call it ready
- Each mutation targets one invariant.
- Failure names the harmful behavior.
- The restored implementation passes the same check.
When to stop or choose another method
Stop treating coverage percentage alone as proof that tests protect approval, ownership or result-selection behavior.
