Mutation Testing
Install
pip install mutmut
Run
mutmut run --paths-to-mutate src/
mutmut results
Interpreting Results
- Killed: test caught the mutation (good)
- Survived: test missed it (bad)
- Timeout: mutation caused infinite loop
Aim For
80% mutation score
- Focus on survived mutants first
- Add tests for untested branches