Originally written in French. Translated by AI — the meaning has been preserved, not the prose.
Main idea
A coverage figure measures the share of the code the tests run through. It does not say whether a test would fail if the rule it is supposed to protect were broken. A repository can show high coverage without the right rules having been tested.
Mutation testing answers that other question. It deliberately introduces small changes into the code — inverting a condition, moving a boundary — and watches whether the test suite fails. A change that gets through without making any test fail flags a rule that nothing really protects.
The tool gains value when several coding agents work on the same product: an agent that has misunderstood a rule can write a test that validates its mistake, and only a check of the tests' sensitivity against independently defined invariants brings it to light.
Why it matters
When writing tests is delegated, you need proof about the tests themselves, not just about the code they run through.
Nuances and limits
Mutation testing measures how sensitive a test suite is, not its business relevance: a suite can detect every mutation of code that implements the wrong rule. It complements a testing strategy; it does not replace one.
Open questions
- Which part of the code should mutations focus on when you cannot mutate everything on every change?