Tuesday, 5 June 2007

Let's Crush This Myth Now or VSTS does do TDD!

I've just read a post part of which made my blood boil (and I'm not going to link to it but just say that he's not "my very good friend"). The post was comparing VSTS to NUnit and said "Moreover, it's solution inside VSTS is not able to be used in a way that supports TDD as we know it, with its emphasis on generating tests from code." This is complete bullshit. There is nothing inherent in VSTS that stops it supporting TDD. VSTS unit testing is incredibly like NUnit. As an NUnit user (and I am) you can easily move to using VSTS, it's simply a matter of adapting to different attribute names for setting up the tests and different method names for the asserts. In fact it could be argued that with the ability to generate method stubs from within the code VSTS is more able to support TDD than NUnit.

For example I can do this

public void MyTest()
{
   User u = new User();
   u.CallANewMethod();
}

where

CallANewMethod
doesn't exist.

At this point, click on

CallANewMethod
and select 'generate metod stub' and bingo, test driven development. I've written the test and generated stub from the test.

Posted by kevin at 4:14 PM in Net

 

Your comment:

SCode: (*) Generate another code
SCode

Please enter the code as seen in the image above to post your comment.

(not displayed)
 
 
 

Live Comment Preview:

 
« June »
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930