On unit testing

I have a love-hate relationship with unit testing. I like testing in general, it inreases the quality of software. And I like tests that can be run automatically even more. But the reverse, tested code means quality software, is certainly not true. There are so much more qualities when it comes to good software

  • Appeals to the user
  • Is shipped on time
  • Is delivered within the budget

Unit testing is hard, it takes a lot of work and it takes a lot of intelligence and experience to do it right. Like any testing you should formulate a strategy upfront. Determine where your biggest risks in terms of impact of bugs are (calculated as chance times impact), and concentrate your efforts there.

Fortunately I am not the only one having this opinion: read Untested code is the dark matter of software

Advertisements

%d bloggers like this: