Skip to content
Latchkey

Mutation Testing - CI/CD Glossary Definition

Mutation testing deliberately injects small bugs and checks whether your tests catch them. Surviving mutants reveal code that is executed but not actually verified.

Mutation testing measures test-suite quality by introducing small changes (mutants) into the code and checking whether the tests fail; a mutant the tests still pass on is "survived", indicating a gap in the tests.

Mutation score complements line coverage, which can be high even when assertions are weak.

Score vs coverage

Line coverage says code ran; mutation score says a bug in that code would be caught. A file can have full coverage but a low mutation score if its tests assert little.

In CI

Full mutation runs are expensive, so teams often mutate only changed files per pull request and run the full analysis on a schedule.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →