Mutation Testing with PHP
summary
Mutation testing for PHP is demonstrated using the Infection PHP tool on a shipping calculator example; it generates mutants (flipping conditionals, changing signatures) to show that 66% line coverage can still hide a low mutation score (~15%). The workflow runs in CI with GitHub Actions and the concrete approach is to add targeted tests that kill surviving mutants, raise the mutation score, and produce actionable diffs to improve test confidence.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:04What is mutation testing
- 2:31How mutation testing works
- 3:56Measuring test effectiveness
- 7:28Practical demo: shipping calculator
- 12:35Fixing failing mutants
- 14:23Starting mutation testing
- 17:32Resources and next steps
related talks
55mThe Absolute Beginner’s Guide To Mutation Testing
37mMutation testing: better code by making bugs
34mAre your tests any good? Discover Mutation Testing
41mMutation testing in practice
43mInfection: How to Measure the Quality of Your Tests
42mHow Can I Trust My Test Suite?
36mMutation Testing: Did my test break my code ? 🤔
26mMutation Testing
