Is it possible to add the unit testing functionality (in Visual Studio 2010 We开发者_JAVA百科b Developer Express) for an already existing ASP.NET MVC project?
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.
Yes. Add a test project to the solution
精彩评论