Code coverage is a metric that measures the percentage of your codebase executed by your test suite. It's a helpful tool for identifying untested code, but chasing high percentages for vanity metrics is a fool's errand that distracts from thoughtful, meaningful testing.
"We added 500 pointless tests to hit the arbitrary 90% code coverage mandate from management, but now the build takes 45 minutes."
"I'd love to refactor this legacy codebase, but there's 0% code coverage so I'm flying blind over here."
Test Coverage by Martin Fowler explains the misconceptions and limitations of code coverage as a metric, and how to use it effectively.
Goto Fail, Heartbleed, and Unit Testing Culture by Mike Bland discusses how unit testing and a testing culture, beyond just code coverage, could have caught major bugs.
Eradicating Non-Determinism in Tests by Martin Fowler covers techniques for handling flaky tests that undermine the reliability of your test suite and code coverage metrics.
Note: the Developer Dictionary is in Beta. Please direct feedback to skye@statsig.com.