↓Skip to main content
  1. Tags/

Test

‘100% code coverage, unless…’

·2 mins

When asked about my point of view about a guideline concerning code coverage, my answer always is: go for 100% code coverage. 100%, unless… Here is why.

When the guideline for code coverage is 80% (not an uncommon guideline) the devil is in the details. Or in the 20% which is not covered to be exact. When a developer ‘only’ needs to cover 80% of his code, you can expect him (or her) to start with the easiest scenario’s, and work his way towards the more difficult scenario’s until the coverage guideline has been met. This way, the scenario’s which are the most difficult to realize as a test aren’t hit. And, more important, the developer didn’t think about the most difficult scenario’s and how to test them. In that case the remaining 20% is completely unknown*. I know several testers and I can assure you: they don’t like that.

This is NOT a test.

·2 mins

Test Driven Development is hot, just like unit testing your software and any other kinds of (automated) testing. And as we all know: sometimes stuff that’s hot is misinterpreted, explained wrong or just simply used in a really bad way. Unfortunately, testing is no exception to this rule…