Test Driven Development & Visual Studio 2010

14 בנובמבר 2008

תגובה אחת

Up to now, Visual Studio did a great job helping us develop applications and tests based on existing classes and methods, but when you don't have your API ready, the IDE will fight you. TDD is out there for some time now and is popular, however the IDE gives all those developers who use TDD hard time.


Visual Studio 2010 IDE has some improvements to allow test first style.


Class Stub


I love using the method stub, where if I don't have a method the IDE allows me to auto generate it with the parameters and signature as needed. In VS 2008 you could not use a stub to generate a class; So, when TDDing, you will need a lot of the times to generate classes that does not exist yet. Up to now, the IDE will fight you. In VS 2010 you can create classes using stubs. Cool!


MS Tests Extensibility


Lets say you have your unit tests written in MBUnit. You will have classes that uses the TextFixture (and not the TestClass) and you will have the Test attribute (and not he TestMethod) and so on and so forth. It will be hard to migrate those tests to Microsoft unit test framework in order to use the testing engine, right? Well in VS 2010 IDE, you do not need to think about migration rather you think about extending the VSTestRunner framework (the testing engine). Simply put, you can add any third party frameworks to the VSTestRunner framework. This is very cool!

kick it on DotNetKicks.com

הוסף תגובה
facebook linkedin twitter email

כתיבת תגובה

האימייל לא יוצג באתר. (*) שדות חובה מסומנים

תגובה אחת

  1. Jeff Brown14 בנובמבר 2008 ב 15:25

    I'm not quite sure what you mean by adding any third party frameworks. There's some work involved in doing that! ;-)

    Anyways, there is a beta of Gallio / MbUnit v3 with Visual Studio 2010 integration:

    http://blog.bits-in-motion.com/2008/11/gallio-and-mbunit-v3-for-visual-studio.html

    This beta will also work for NUnit, xUnit.Net, CSUnit, MbUnit v2, NBehave, MSTest and anything else Gallio supports.

    להגיב