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.
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.
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With