views:

716

answers:

2

Hey all,

I've decided to integrate NUnit with VWD2008.

I did the following- 1) Installed NUnit - Ran a Sample project that was included with the installation all the tests were fine. 2) Installed TestDriven.Net 2.0 - Personal distribution. 3) I have written on an MVC Project a test and when I try to right click the context and run the Test it fails. In addition I had to add reference the NUnit.framework dll in order to write the tests.

What have I done wrong?

+2  A: 

Testdriven.Net doesn't work with the express editions of visual studio. Previous versions of Testdriven.Net did work with the Visual Studio Express editions but Microsoft didn't like that and put their lawyers on it. http://weblogs.asp.net/nunitaddin/archive/2007/07/06/microsoft-amp-testdriven-net.aspx

You could try sharpdevelop if you want a free ide with unit-testing support.

Mendelt
+1  A: 

Like Mendelt said, TestDriven.Net doesn't work with the express editions. I've got VS2008 Standard Edition so I had to use the "long way" of using NUnit. You have the NUnit GUI open and load your dlls. Then you attach to that process from the Debug menu in VS2008 and run your code.

All that being said, I'm not sure if it is the same for MVC or not. I know in the few blogs I've read, there have all been examples of mocking for MVC. Perhaps something you should look into.

Nick DeVore
Yeah I'm using the long-way to unit test with NUnit. They only thing that bugs me is that debugging the unit tests requires me to run the code with some stub i create outside the unit test.
Yarin Miran