Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Has anyone integrated NUnit with Visual Studio 2010?

Has anyone integrated NUnit with Visual Studio? I'm trying to set up a build pipeline like this one. But, I'm pretty new to .NET and I'm still understanding how things work. There are many resources in the internet on NUnit + VS, and I'm confused.

like image 705
OscarRyz Avatar asked Apr 04 '12 15:04

OscarRyz


People also ask

What is NUnit test adapter?

The NUnit 3 Test Adapter allows you to run NUnit 3 tests inside Visual Studio or with dotnet on the command line. The current release is designed to work with Visual Studio 2012, 2013, 2015, 2017, 2019 and 2022. Some features are not available under VS2012 RTM.


2 Answers

I'd recommend you to use Resharper.
As some say, "It just works".
Disadvantages/side effects of this choice in your case could be:
1. Resharper is not free;
2. Running unit-tests is minor part of Resharper - it also includes tons of other features, which you maybe do not need for now(but you can disable most of them in setttings).

Free solution is - Visual Nunit 2010 Visual studio extension. Free and does exactly what you want.


UPDATE
How to add NUnit to your project.
I've found this tutorial. Follow it step-by-step, I've found it helpful and complete for .NET novices.

The only difference is that in Running Unit-Tests section for running tests author uses test runner tool that is distributed within NUnit itself, but you can use ReSharper runner as described in JetBrains' docs

like image 113
alex.b Avatar answered Sep 25 '22 21:09

alex.b


I'm using this: http://visualstudiogallery.msdn.microsoft.com/c8164c71-0836-4471-80ce-633383031099

Which works quite well for me. You can access it within VS2010 from View->Other Windows->Visual NUnit

like image 21
Fayilt Avatar answered Sep 25 '22 21:09

Fayilt