Mutation Testing
summary
Java + JUnit + JaCoCo example implements a simple palindrome function, reaches 100% JaCoCo coverage only after adding a partial-palindrome test, then runs mutation testing with Pit via Maven which modifies bytecode in memory and re-runs only the affected tests. Pit generates 9 mutants, initially 9 mutations, 8 killed -> 9/9 killed after adding a two-character test to cover the boundary (less than two), and the project + report live on GitHub.
AI-written summary · about
chapters (7)
- 0:00Introduction to mutation testing
- 3:23How mutation testing works
- 10:26Demo with palindrome function
- 25:50Evaluating test quality
- 29:46Running Pitest on code
- 37:03Best practices and limitations
- 41:58Q&A
related talks
50mFrom jUnit to Mutation-Testing
45mJulius Mischok: Test Your Tests!
45mMutation Testing
38mMutants to the rescue: How effective are your unit tests?
36mMutation Testing: Did my test break my code ? 🤔
41mMutation testing in practice
38mThe state of code coverage for Kotlin
48mMutation Testing, or What Code Coverage Keeps Silent About
