Coverage Metrics Are Misleading

🌳 Evergreen Note Planted 27 April 2026
software-testing unit-tests metrics test-coverage

Coverage tells you which code was executed during tests, not which behavior was verified. A test that runs every line without asserting anything achieves 100% coverage while testing nothing. When coverage becomes the target, Goodhart’s Law kicks in: developers write tests to satisfy the metric rather than to verify behavior, high numbers create false confidence that discourages deeper thinking, and time gets spent chasing percentages instead of understanding which paths actually matter.

Coverage is useful as a floor detector (very low coverage signals undertesting) but useless as a ceiling indicator. Treat it as a necessary but wildly insufficient condition.

📝 Related Blog Posts