How code coverage can be used and abused to guide testing.
summary
Argues that code coverage is useful when it augments test suites rather than serving as a hard target, and that running a code coverage tool to find uncovered lines leads to writing tests that actually find faults. Cites evidence that suites with 90%+ coverage catch more bugs but that 100% coverage is not proof of quality. Recommends focusing on uncovered code, preferring simple statement coverage, and avoiding tests written solely to boost a metric.
AI-written summary · about
chapters (8)
- 0:00Intro
- 0:13Why is code coverage useless
- 0:36How to use code coverage
- 1:51How we know we are done
- 2:48Why you should not use code coverage
- 3:06Does higher coverage lead to better software
- 6:13High coverage may not mean much
- 6:39Summary
related talks
03mTest coverage
28mUnveiling the Illusion: Why Coverage Alone Is Misleading
26mImproving Coverage Analysis
10m99% is not enough - full test coverage and why it's awesome
51mDebunking Myths Around Test Coverage
41mHow Can I Trust My Test Suite?
35mRisk Based Code Coverage Analysis
38mYou don’t need unit tests!
