Qcom
Qcom

Reputation: 19173

VS2010 ASP.NET MVC add unit test to existing project

Is it possible to add the unit testing functionality (in Visual Studio 2010 Web Developer Express) for an already existing ASP.NET MVC project?

Upvotes: 1

Views: 1917

Answers (2)

Ahmad
Ahmad

Reputation: 24847

AFAIK you don't have the option of creating test projects with the VS Express versions as they are not supported. This answer also seems to support my assumption.

However, you can use NUnit as the testing framework by creating a new class library project and configuring VS accordingly. I used the method described in this blog post and it works. In summary, you configure NUnit such the test runner executes your test project's dll. You also setup and a handy menu bar item to actually start your tests.

If you are referring to the default MSTest functionality, there is probably no test runner available. Not sure what VS Express installs, but you may dig around to see if the mstest.exe file is available and then use the command line options to run your tests.

There is no perfect solution with testing when it comes to the express version of VS.

Upvotes: 3

Jimmy
Jimmy

Reputation: 9815

Yes. Add a test project to the solution

Upvotes: 0

Related Questions