mutation-testing
Installation
SKILL.md
Mutation Testing
Mutation testing evaluates test quality by introducing small, deliberate bugs (mutations) into code and checking if tests catch them. This provides a behavioral measure of test effectiveness beyond simple coverage metrics.
Core Concept
Mutation testing workflow:
- Generate mutations (small code changes)
- Run test suite against each mutation
- Classify results:
- Killed: Test fails (good - test caught the bug)
- Survived: Test passes (bad - test missed the bug)
- Timeout: Test hangs or exceeds time limit
- Calculate mutation score:
killed / (total - timeouts) - For survived mutants, generate targeted tests
Why mutation testing matters: Tests can achieve 100% line coverage while missing critical bugs. Mutation testing reveals if tests actually verify behavior or just execute code.