Unit Testing with Visual Studio 2008

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.

Print | posted @ Monday, July 23, 2007 4:41 AM

Comments on this entry:

Gravatar # re: Unit Testing with Visual Studio 2008
by punkcoder at 7/23/2007 12:21 PM

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.
  
Gravatar # re: Unit Testing with Visual Studio 2008
by Jeffrey Palermo at 7/23/2007 2:17 PM

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 # re: Unit Testing with Visual Studio 2008
by Faruk at 2/3/2010 5:49 AM

How can i use unit test with .Net 2008.Please give me example.
  

Your comment:

Title:
Name:
Email:
Website:
 
Italic Underline Blockquote Hyperlink
 
 
Please add 1 and 2 and type the answer here: