For the love of TDD! - TechRepublic
General discussion
July 18, 2012 at 08:58 PM
mathurashwin

For the love of TDD!

by mathurashwin . Updated 13 years, 11 months ago

In this day and age of open source software development where unit testing and TDD are considered a way of life, I find it appalling that it is just not accepted and enforced at quite a few software development companies.

In my approx. 12 years of experience as a software consultant, I have seen the landscape evolve from minimal developer testing to where its considered a sacrilege to check in your code without at least a test script tracing through it. Some places even have strict rules for the percentage of minimum code coverage that must be met at all times. Writing unit test cases is no longer considered a waste of time and in fact, in my humble opinion, provides for solid documentation which no word or pdf document can even come close to for a developer. Its hard not to see the benefits of a well written suite of test cases that can be run over and over to make sure that you haven’t broken any code while making some changes to it.

Why then, do I still find software companies where you need to convince them of these benefits? Why then, do they think that just having a test team suffice for ensuring software quality? Why do they fail to see that having a set of unit tests handy can save them a lot of the developer’s and the tester’s time (and time = money :))? One might argue that if it takes hours to write the test case itself, there is no gain there. This argument, I’ve found to be quite far from the truth mostly since once written, the test case can be run multiple times every time a change is made to that functionality, effectively saving a lot of time over the life time of the software. Of course, just writing unit test cases cannot and will not replace the testers job but it does make sure that once something’s fixed, it remains so even without a round-trip back from the tester.

The main reason that I’ve observed for this nonchalance towards unit testing is that this usually happens where the client has ‘outsourced’ its development work to a ‘software’ company and where the only expectation back is that the software ‘works as desired’… even if it is held together by duct tape 🙂

This discussion is locked

All Comments