The more, the merrier! Login and vote now.
By asgeirn
via blog.asgeirnilsen.com
Published: Aug 26 2007 / 13:41
When doing Test-Driven Development, one critical metric is test coverage. And it is often quite difficult to achieve 100% test coverage on a given method using its "normal" unit tests.
This can often lead to very strange looking test code written specifically to test all possible branches and every corner case. Sometimes this is useful, but more often than not its testing for testings sake.
Comments
raveman replied ago:
so we should test getter and setters?
jvwilge replied ago:
The comment of Stephan is very important, without that comment I'd probably downvoted this article. With 100% test coverage you still can have bugs. Test coverage should be an indication, not a goal, just make sure your tests test you code, not just cover it.
Voters For This Link (17)
Voters Against This Link (0)