Is it possible to integrate NUnit into Visual Studio 2010?
When I create a ASP.NET MVC web application in Visual Studio 2010 it offers also to create a testing project using开发者_开发知识库 one of framework from the list.
But I have only VS built-in testing framework in it.
Is it possible to add NUnit there?
NUnit integration for Visual Studio
Visual NUnit 2010
Here's another tool to do this: NUnit for VS. I've not yet used it:
This add-in for Visual Studio Team System will allow you to run NUnit tests just like Visual Studio Unit tests integrated in Visual Studio. It makes Visual Studio to see NUnit test as mstest. That means everything you can do with Visual Studio Unit tests you can also do with NUnit tests. For example publishing of results in TFS or code coverage.
You may follow the directions in this article. If you don't care about the template, just select No
when asked about creating a test project and later add it manually to the solution.
I'd recommend the ReSharper suite of VS.NET integrated tools that includes an excellent NUnit runner. ReSharper is a commercial product but well worth the money and standard issue for our development team.
(I have no commercial interest in JetBrains - just a happy customer)
You can use Testdriven.net plugin for Visual Studio which gives you the opportunity to run NUnit tests directly from your test project.
Also, as no-one's mentioned it, there's NCrunch.
精彩评论