Skip to content

Mutation Score

Spicy — senior dev territoryTesting

ELI5 — The Vibe Check

Mutation Score tells you how good your tests REALLY are — not just coverage, but whether they actually catch bugs. It inserts small bugs (mutations) into your code and checks if your tests fail. If they don't fail, your tests are useless even with 100% coverage. It's the honesty test for your test suite.

Real Talk

Mutation score is the percentage of code mutations (operator changes, condition inversions, statement deletions) detected by the test suite. A higher mutation score indicates more effective tests. Tools include Stryker (JS/TS), PIT (Java), and mutmut (Python). High computational cost limits it to critical code paths.

When You'll Hear This

"Our code has 90% coverage but only 60% mutation score — lots of tests aren't actually asserting anything." / "We run mutation testing on core business logic only — it's too slow for the whole codebase."

Made with passive-aggressive love by manoga.digital. Powered by Claude.