Infection: How to Measure the Quality of Your Tests
summary
Shows how to measure PHP test quality using the Infection mutation-testing library (requires PHP ≥ 7.4). Demonstrates generating mutants and comparing them against the test suite, with concrete runs: 20 mutants → 9 killed/11 survived (MSI 45%), a microservice run with 775 mutants → 575 killed (MSI 74%), ~33s to run ~700 mutants, and how improving tests raises the MSI to 75%, 95%, then 100%. Also covers CI integration and how to exclude specific mutations.
AI-written summary · about
chapters (12)
- 0:00Test quality intro
- 3:02Unit test types
- 8:43Test example and coverage
- 11:30Coverage metric limits
- 14:20Mutation testing defined
- 21:52Practical use with Infection
- 26:12Improve tests with mutants
- 29:26Decathlon results
- 31:32Mutation testing in CI/CD
- 32:16Tips for adoption
- 33:43Code vs test quality
- 34:47Thanks
related talks
19mMutation Testing with PHP
39mInfection: When the X‑Men Help Us Test Better
42mHow Can I Trust My Test Suite?
55mThe Absolute Beginner’s Guide To Mutation Testing
43mMutation Testing, Finally a Good Measure of Test Quality?
30mMutation Testing, Finally a Good Measure of Test Quality?
41mHow Can I Trust My Test Suite?
34mAre your tests any good? Discover Mutation Testing
