Code Elegance

Write all your test

I’m a big fan of TDD and I try to infect everyone with Unit Testing and TDD.

TDD is an hard practice, you have to be clever if you want that your effort is worthwhile. Why?
Because if you write tests that do not cover large parts (or some small critical parts) of your application you can throw your tests away: they are usefull!

Think about it. A unit test suite is useful when you do some refactoring, if somenthing is breaking a test shows it and show where it is the error. But if you don’t cover all your code, what does the green bar means?
That it’s all right or that the test can’t find the bug?

So write all the needed test, be clever! :-)

Posted in Emanuele DelBono | No comments

No comments yet. Be the first.

Leave a reply

Spam Protection by WP-SpamFree