How Can I Trust My Test Suite?
summary
The talk explains how code coverage alone is insufficient and shows concrete metrics and tools to assess test quality: cyclomatic complexity, the CRAP index, and a churn metric to locate risky PHP files, plus mutation testing using Infection on top of PHPUnit. It demonstrates interpretation of mutation results (e.g., 5 mutants, 4 killed → 80% mutation score; adding a boundary test yields 100%), and recommends practices: frequent small deploys, failing CI when mutation score falls below a threshold, and running Infection targeted at changed code.
AI-written summary · about
chapters (10)
- 0:00Trust in test suites
- 2:15Coverage isn't enough
- 5:05Sherlock Code's coverage
- 9:23Cyclomatic complexity & CRAP
- 14:04Change Risk Analysis
- 18:16Mutation testing
- 22:37Infection PHP tool
- 30:56Tool limits & practice
- 33:42Test priorities
- 36:16Q&A
related talks
41mHow Can I Trust My Test Suite?
43mInfection: How to Measure the Quality of Your Tests
19mMutation Testing with PHP
41mMutation testing in practice
38mMutants to the rescue: How effective are your unit tests?
34mAre your tests any good? Discover Mutation Testing
55mThe Absolute Beginner’s Guide To Mutation Testing
01h 03mOptimizing Your Test Suite
