Test Driven Design is about design, not testing

Microsoft has released a set of guidelines for TDD that are justifiably causing some concern. The problem is that the guidelines amend the TDD process to capitalize on automatic test generation and class designer functionality in Visual Studio. By doing so they risk obscuring the key point of TDD in that your design emerges in response to the use case represented by the test. TDD is about ensuring good design, more than it is about testing. The value of the unit tests moving forward are more about being able to refactor your design – to do design all the time, rather than just once up front, fire-and-forget design – and check that your new design does not break the existing one. One reason why learning how to do mocks is important is that otherwise you do not have unit tests, but integration tests, which will valuable, don’t lend themselves as well to this continuous design process.
 
Automated unit testing is great for improving test coverage, particularly in existing code without tests, but please don’t confuse everyone as to what TDD is in this way. The term means something, and it is not what this guideline has changed it to.
Advertisements
This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s