How to Write Better Code Using Mutation Testing
summary
A practical demo of Mutant and Mutest shows automated mutation of real Ruby code against RSpec, turning fragile line coverage into tests that fail when meaningful changes occur and revealing 31 different conditions in a small permissions method. Examples include switching Date.parse to iso8601 vs Date.parse and replacing regex anchors and using the new match? performance method. The tools run incrementally (since a git revision, by test selector), find surprising mutations, and fit into CI.
AI-written summary · about
chapters (15)
- 0:00Intro
- 0:30Talk Outline
- 2:12Mutation Testing by Hand
- 7:55Internal API
- 11:48Hardening Regular Expressions
- 16:49X-Raying Legacy Code
- 18:43Thorough Test Coverage
- 22:50Incredible Dead Code Detection
- 25:43Code Simplification
- 31:43Learn more about Ruby
- 32:54Learn faster
- 33:14Improve your testing skills
- 33:55Introduce fewer regressions
- 34:32Write simpler code
- 35:00Mutation Testing on the Job
related talks
27mThe Mutation Game: Cracking the Enigma of Mutation Testing
41mMutation Testing with Mutant
25mThe Mutation Game: Cracking the Enigma of Mutation Testing
07mWho is Testing the Tests?
20mUnleashing the Power of Mutation Testing: Supercharging Software Quality and Resilien...
41mMutation testing in practice
22mKill All Mutants! (Introduction to Mutation Testing)
01h 06mKill All Mutants! (Intro to Mutation Testing)
