«« Next » « Previous
«« Next » « Previous

Link Details

The more, the merrier! Login and vote now.
Link 37052 thumbnail

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.
  • 17
  • 0
  • 1857
  • 715

Comments

Add your comment
User 191349 avatar

raveman replied ago:

0 votes Vote down Vote up Reply

so we should test getter and setters?

User 234827 avatar

jvwilge replied ago:

0 votes Vote down Vote up Reply

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.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.