23 Nov

Unit Testing Bliss in Visual Studio 2008

Category:UncategorizedTag: , , , :

This post seems appropriate to counter my original post, Unit Testing Irritants in Visual Studio 2008.

F5, You Moron

Firstly, as pointed out by the mysterious Richard in a comment on my original post, you can execute your Test Project (and therefore all unit tests in it) by setting it to your default project and running it with F5 or CTRL+F5. AWESOME!

The next thing to make your life easy in VS is to map a quick hotkey to File.Close. I use ALT+x. The reason for this is the process of TDD spawns a lot of windows in VS. Each level of detail you drill into launches a new window instead expanding a tree node or something. This is fine once you get used to it, but that hotkey is money in the bank.

It has taken me a full day of immersion to get truly productive with TDD + VS Unit Testing, but I am there.

Butter on the Biscuit

With the added advantages of Data Driven Unit Tests and integrated environment tricks using TestContext, I am starting to come around. These topics are worthy of further examination in their owns rights and I will therefore leave that to later posts.


Technorati Tags: ,,

5 thoughts on “Unit Testing Bliss in Visual Studio 2008

  1. A challenge….

    Where are the MS blog posts extolling the virtues of all the new features of unit testing in VS2008? Where is the expert independent comparison with NUnit and MbUnit…, so that we can decide whether to continue with our favourite unit testing framework?

  2. Another cool thing is to go to Tools -> Options -> Test Tools -> Test Execution

    Then, check the [x] Double-clicking a Failed or Inconclusive unit test result displays the point of failure in the test.

    Then you don’t have to double click a failed test that creates a new tab with the test results, *THEN* clicking on the line in the code to get to the failed test.

Comments are closed.