Unit Testing with Visual Studio 2008

Monday, July 23, 2007

Unit testing features will now be available in the Professional version of Visual Studio 2008.

Unit testing has been to Visual Studio what Barry Bonds has been baseball – a center of controversy. First there was the Peter Provost petition to include unit testing features in all version of VS. Then there was the highly criticized TDD guidance accompanying the feature. Next came some performance issues and pain while using the shipping version, and most recently, the TestDriven.NET hullaballoo added an emotional charge to the air.

Putting all this behind us - what's new in 2008? I've been working with the latest bits, and I can say:

  1. Performance has improved dramatically.
  2. The context-menu command "Run Tests" is new (and context sensitive).
  3. Keyboard shortcuts take away the pain of the VS2005 test runner (Ctrl+R, A to run all tests in a solution, Ctrl+R, T to run tests in the current context).

Moving the unit-testing features into the Pro edition is a great move by Microsoft. I hope the feature gains traction and brings awareness of unit testing into the mainstream (although I think we are already close, aren't we?).

Related Links

Guidelines for Test-Driven Development by Jeff Palermo
Rules to Better Unit Tests by Adam Cogan.


Comments
punkcoder Monday, July 23, 2007
Glad to hear it's getting better in VS 2008. We just switched off MSTest over to NUnit/NCover and life is so much better. We just ran into too many issues trying to get unit tests to run on our build server with our nightly build. MSTest doesn't give you much control over where your tests are performed, and it also doesn't integrate it's results easily into CruiseControl.NET.
Jeffrey Palermo Monday, July 23, 2007
I think I'm going to be a LATE, LATE adopter of MSTest, if ever. There has to be a compelling reason to switch off NUnit. "It's the same" is not a compelling reason - never mind that it's not the same.
gravatar Faruk Wednesday, February 3, 2010
How can i use unit test with .Net 2008.Please give me example.
gravatar bhavik Wednesday, September 8, 2010
hi..
i know the basic idea of the unit testing tools of vs. but not aware with how to code for that ..so pls help me in that.with example is very suitable for me ..thanks in advance.
Comments are now closed.
by K. Scott Allen K.Scott Allen
My Pluralsight Courses
The Podcast!