Term

Mutation testing

Info

Originally written in French. Translated by AI — the meaning has been preserved, not the prose.

Short definition

A technique that deliberately introduces small changes into the code to check that the test suite fails.

Full definition

Each change — an inverted condition, a moved boundary, a replaced operation — is called a mutant. A mutant that makes no test fail "survives" and flags a behaviour the tests do not protect.

In the articles on this blog, the term refers to a check on how sensitive the tests are, recommended whenever a business rule has to be protected and several agents work on the code.

Usage in the field

Checking code produced by agents, protecting business invariants.

Synonyms and variants

Mutation analysis.

Not to be confused with

  • Test coverage — the share of the code executed by the tests, which says nothing about their ability to detect a mistake.
  • Regression test — a test that checks an existing behaviour has not changed after a modification.

Examples

Checking that a test suite fails if an operation still missing a sign-off is made approvable.

Ambiguities / debates

No notable debate: the term is stable in its technical use.