Testing Tests in Combat: Mutation Testing with Pitest
summary
The talk explains how to use Pitest mutation testing in Java projects to verify that unit tests truly protect code rather than giving a false sense of security. It covers practical setup: running Pitest only on changed code in PRs to speed analysis, handling false positives, creating custom mutators when built-ins are insufficient, and integrating mutation testing into CI/CD so the team actually adopts it.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 1:03Why test tests
- 2:07Limitations of coverage
- 4:17Mutation testing basics
- 5:44Pitest overview
- 6:44Setting up Pitest
- 7:51Analyzing report
- 9:41How it works
- 15:45Real-world challenges
- 16:28Slow execution time
- 18:35Testing only changes
- 21:30Optimizing performance
- 22:35Unwanted mutations
- 24:45Disabling noise
- 25:29Custom mutators
- 29:19CI integration
- 33:11Team adoption
- 36:47Tool visibility
- 37:50Key takeaways
- 40:22Q&A
