DEV Community

Discussion on: Why code coverage is not a reliable metric

Collapse
 
dguhl profile image
D. Guhl

Your validator checks for emails being valid or not - it doesn't make any sense to check only one valid email address. Code coverage is an indicator of how much of your code is covered by any test, not a note for how good your test is. (Unfortunately, most code coverage measures don't check on how often a test ran over code to strengthen the result...)

Collapse
 
conectionist profile image
conectionist

This is exactly the point I'm trying to make!
Most people seem to think that if one or more unit tests have covered an area (i.e. has 100% coverage) then that area is bullet proof.
But the sad reality is that it may very well not be.