This blog post by Uncle Bob at Objectmentor got me thinking about how Visual Studio automated Testing can help in your Test Driven Development effort. 

First off, let me say that I fervently agree with Uncle Bob that TDD cannot be replaced by automatically generating tests.  The intent of Test Driven Development is for your tests to drive your development (duh!).  So if I have to create my objects first, and then generate my tests, our tests could not possibly be dring our development.

That seems self-evident to me, but I urge you to look at Uncle Bob's post if you need more convincing on why TDD is a good thing.  As stated in Bob's post, if you do have legacy code, though, automatically generated unit tests can help with creating a beginning suit of tests for that code. 

But what makes the automated generation a benefit (and I am mainly familair with Microsoft Visual Studio products, not others) are the following thought.  If you are a one or two man shop who can't afford training, but have Visual Studio Testing, these autogenerated tests can demonstrate some good techniques for creating unit tests.  I'm not saying these are tests written by Kent Beck, but they can help a beginner with where to start.

Be sure to supplement this with a book like xUnit Test Patterns: Refactoring Test Code (The Addison-Wesley Signature Series) by Gerard meszaros.   The point is that this aspect of Visual Studio can help get started.       

 

Sponsor