A colleague of mine forwarded an article to me during this last week, which he prefaced with the following statement …

guys, I’ll write it in all caps and bold:

I AM NOT PROMOTING OR IN AGREEMENT OF ANY OF THE POINTS THE ARTICLE MAKES.

… which begs the question, why did he send it not only to me, but an entire team of people? I choose to believe it was because he is an enlightened soul that understands that the best way to reinforce your own beliefs is to read more of the opposing point of view, not more of the view you already have. I am lucky to have a few of these souls working for me right now.

Here is the article he was referring to if you would like to read it yourself:

It’s OK Not to Write Unit Tests by Chris Ashton on the MSDN blog.

I started to write a big long ranty response to this post, but then realized much more enlightened folks had beat me to the punch.

Check out Uncle Bob Martin’s rebuttal in his post titled Excuse me sir, What Planet is this?

And also Justin Etheredge’s in his post titled It’s Okay To Write Unit Tests.

So I will limit my rebuttal to a single simple paragraph.

All of the arguments made by the author against Unit are based on examples of bad practices in Unit . In other words, the authors argument that is bad/evil etc., can be restated as if you are doing Unit Testing badly, then you are not getting all the benefits of Unit Testing and hence you should probably either figure out how to do it better, or simply just stop. Now, I am not officially empowered by the Unit Testing community to speak on their behalf, but I strongly doubt anyone would disagree with that statement. So while the author has certainly identified a problem (ie. the Unit Testing he does or has been exposed to does not provide value), his diagnosis of the cause really misses the mark by a wide margin.

So what are YOU saying, man?
Another colleague who did read through the article raised an additional interesting point. If you check out the About page on the blog, a couple of revealing facts are brought to light.

Firstly, the author works for (cue The Imperial March from Star Wars). I am sure the author is a capable engineer (developers who can write usually are), but working for Microsoft taints his authority to give out advice on how to write quality and deliver better products. The FUD spreading continues.

Secondly, huh, you know a couple of seconds ago when I not so subtly implied that Microsoft writes bad and releases that disappoints their customers regularly – the author actually confesses this exact point on this page in regard to the projects he personally works on. That was convenient.

Thirdly, his nickname cashto is way cooler than what mine would be if I tried the same name concatenation game – cdicks is quite funny but really is not work appropriate.

What do you think the value of Unit Testing is?