Glossary
Glossary Mutation Testing

Mutation Testing

Also known as: mutation test, mutant
TechTesting

Definition

Deliberately breaking the code in small ways — flip a comparison, drop a branch, change a constant — and running the tests; a mutant that survives is a test suite that would not have noticed

Measures test quality where coverage measures test reach. A line can be 100% covered by a test that asserts nothing about it; mutation testing is how you find that out.

Tech

The test of the tests. Coverage tells you a line ran; a mutation score tells you whether a test would have caught it changing. The two disagree more often than people expect, and the disagreement is always in the same direction.

Related Terms

  • a: Appearance
  • ?: Keyboard shortcuts