12.05.07

Misleading Test Coverage Numbers

Posted in Programming at 8:39 pm

I’m always having to explain why line coverage is misleading. This is probably the best, most obvious example of why.

See, 100% coverage!

Full Coverage

So let’s reformat some code, you know, just ‘cuz we prefer do … end rather than curly braces.

Not quite fully coverage

Oops.

Know what your tests do, people, don’t just look for the nifty green bar from rcov.

RSS feed for comments on this post · TrackBack URL

Leave a Comment