Test Driven Development is not about testing

http://parlezuml.com/blog/?postid=517

People who practice test-driven development are doing design. It’s important - actually, it’s critical - to understand that. If you fall into the trap of thinking that TDD is about unit testing, then you’ll probably miss the point.

Too many teams believe they’re doing TDD, but are actually just writing unit tests for code they’ve already written, or writing one unit test and then writing 500 lines of production code before they move on to the next unit test.

Absolutely. Applications that have unit tests written before the actual code tend to have looser coupling, cleaner design and concentrate purely on what is required (rather than evolutionary dead ends).

This entry was posted on Wednesday, November 14th, 2007 at 5:46 pm and is filed under Writing Reliable, Bug-Free Code. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply