High Code Coverage Scores Can Hide Dangerous Gaps in Test Quality
A widely cited problem in software engineering is that code coverage percentages measure which lines were executed during testing, not whether those tests actually validate meaningful behaviour or catch real bugs. Research by Kochhar et al. across 100 large open-source Java projects found no significant correlation between coverage scores and post-release bug rates, while Inozemtseva and Holmes identified line coverage as the least predictive quality metric available. When organisations set coverage thresholds as pass/fail gates, engineers rationally optimise for the number by writing tests that cover high-line-count happy paths, leaving error handling, retry logic, and edge cases untested. This dynamic follows Goodhart's Law: once a proxy metric becomes a target, it stops reflecting the underlying goal it was meant to represent. Addressing the problem is described as a management decision about incentive structures before it becomes a question of tooling or engineering practice.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in