Overview
Mutation testing is used to evaluate the quality of a test suite. A 'mutant' is a version of the code with a small change (e.g., changing a > to a >=). If the tests fail, the mutant is 'killed'. If the tests pass, the mutant 'survived', indicating a gap in the test suite.
Why use it?
Code coverage only tells you which lines were run. Mutation testing tells you if your tests are actually capable of catching bugs in those lines.
Popular Tools
- Stryker (JS, C#, Scala)
- Pitest (Java)
- Mutmut (Python)