DZone.com
Follow
Does 100% Code Coverage Mean Tested?
There is a number that engineering organizations love to report, and that engineering leaders love to receive: 100% code coverage. It has the satisfying quality of completeness. But completeness of what exactly? It implies that every line has been tested, every branch examined, every condition verified. It looks like the mathematical proof of a job well done. It is not, however. And the gap between what that number promises and what it delivers is, in many organizations, the single most expensive misunderstanding in the quality program.Code coverage measures the proportion of code that tests execute, not the proportion of behavior that tests verify. These are profoundly different things, and conflating them produces systems that are well-covered, yet dangerously under-tested. The engineers know the coverage number. The executives trust the coverage number. And the system fails in ways that the coverage number was incapable of detecting.