Pure Danger Tech


navigation
home

Coverage != testing

14 Nov 2007

This is in response to Mario’s quote on Eric’s blog mentioned by Eric in a comment on Mike’s blog (highly and unfairly excerpted here):

If we always start with failing tests before writing code that adds new capability to an application, it is inevitable that tests we write will cover classes with trivial complexity.

I think the danger with this line of thinking is that it implies that

  coverage == testing

But I would strongly state the opposite and the justification as:

  coverage != testing whereas

  coverage == use and

  testing == correct use (by way of assertion checking)

and there is a world of difference between just using the ATM and verifying it actually gave you $60. :)

Or as I’ve seen elsewhere and don’t have the reference right now: Testing verifies your code, coverage verifies your testing, but you can’t say that coverage tests your code.