views:

1434

answers:

4

When I create a New Project of type ASP.Net MVC Web Application, I expect the dialog for unit test applications to show up, but it does not. I cannot find the Unit Test App among the product types I can create either. How do I set up my VS so that the dialog shows up?

I have installed Visual Studio 2008, .Net Framework 3.5 SP1 and ASP.Net MVC Framework (Beta).

+3  A: 

As @MrJavaGuy says, you need to install at least the Professional, not Express, version of VS2008. Alternatively, you can install nUnit and/or TestDriven.Net and get unit testing capabilities. Info on nUnit can be found at http://www.nunit.org/ and TestDriven.Net at http://www.testdriven.net/. I recommend TestDriven.Net even if you have the testing capabilities of Visual Studio baked in.

tvanfosson
A: 

Hi,

Thanks for your replies. I have VS2008 Professional edition already (version 9.0.30729 SP, according to the "About" dialog). Do i need a later version yet? Or am I missing another component?

And while we're mentioning them, what are the pros and cons of nUnit and TestDriven.Net compared to the MS version included? I am completely new to unit testing, and my main objective with this is to check it and see whether i like the concept as a whole.

Tomas Lycken
TestDriven.Net adds some right-click menu items that allow you to easily run individual unit tests with/without debugging and with/without code coverage. It also adds the ability to run using nCover instead of MS code coverage. I prefer nCover because it opens a new window by default.
tvanfosson
MS code coverage requires the team suite version, so if you want code coverage with professional you need nCover.
tvanfosson
A: 

Had the same problem with Visual Web Developer Express, I found this blog.

http://blogs.msdn.com/webdevtools/archive/2008/05/30/asp-net-mvc-preview-3-tooling-updates.aspx

I downloaded

http://www.box.net/shared/zmp0cdxsss

and that worked for me.. Not sure if this will sort your issue though. Best of luck with it.

Skittles
A: 

Turns out one of the problems were that I hadn't installed Testing Capabilities with my VS installation - running the installer and adding the feature made everything roll smoothly =)

Tomas Lycken