A package including the NUnit 3 TestAdapter for Visual Studio 2012 onwards. With this package you don't need to install the VSIX adapter package, and you don't need to upload the adapter to your TFS server.
Note that this package ONLY contains the adapter, not the NUnit framework. You must also get the framework. You only need one such package for a solution.
The package works with Visual Studio 2012 and newer.
C# - Install NUnit With Visual Studio 2017 - Stack Overflow
See the version list below for details.
Both Visual Studio 2012 (Update 1 or later) and TFS Build is NuGet test adapter aware! Since NuGet installs the adapters into the solution itself, the adapters follow the solution, and the tests will “just work” without any need from the developer to install anything. NUnit Adapter on NuGet. I paired up with someone else who knew C#, so it was a good opportunity to try doing the kata in Visual Studio for Mac! Although I've kicked the tires on VS4Mac a bit, one of the things I hadn't tried testing out was, well. Method 1: An NUnit Library Project. The easiest method is to just create a new 'NUnit.
The switch from the project.json format to the new csproj based format for.NET Core and.NET Standard projects also changed the API for test adapters.Because of this, NUnit's dotnet-test-nunit adapter stopped working and we had to update our existing Visual Studio test adapter to support.NET Core.
Release Notes
This release works with NUnit 3.0 and higher only.
Dependencies
.NETCoreApp 1.0
- Microsoft.DotNet.InternalAbstractions(>= 1.0.0)
- System.ComponentModel.EventBasedAsync(>= 4.3.0)
- System.ComponentModel.TypeConverter(>= 4.3.0)
- System.Diagnostics.Process(>= 4.3.0)
- System.Reflection(>= 4.3.0)
- System.Runtime.InteropServices.RuntimeInformation(>= 4.3.0)
- System.Threading.Thread(>= 4.3.0)
- System.Xml.XmlDocument(>= 4.3.0)
- System.Xml.XPath.XmlDocument(>= 4.3.0)
Used By
NuGet packages (125)
Showing the top 5 NuGet packages that depend on NUnit3TestAdapter:
Package | Downloads |
---|---|
SpecFlow.NUnit.Runners Combined package to setup SpecFlow with NUnit easily for running the tests with the NUnit runners. | |
Objectivity.Test.Automation.Common.NUnit [DEPRECATED]UseInstall-Package Ocaramba.Features Install-Package Ocaramba.MsTestInstall-Package Ocaramba.NUnit Install-Package Ocaramba.xUnit instead | |
SpecsFor.Core SpecsFor is another Behavior-Driven Development framework that focuses on ease of use for *developers* by minimizing testing friction. | |
Atrico.Lib.Testing | |
Objectivity.Test.Automation.Common.Features [DEPRECATED]UseInstall-Package Ocaramba.Features Install-Package Ocaramba.MsTestInstall-Package Ocaramba.NUnit Install-Package Ocaramba.xUnit instead |
GitHub repositories (515)
Showing the top 5 popular GitHub repositories that depend on NUnit3TestAdapter:
Repository | Stars |
---|---|
Wox-launcher/Wox Launcher for Windows, an alternative to Alfred and Launchy. | |
icsharpcode/ILSpy .NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform! | |
OpenRA/OpenRA Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X. | |
JamesNK/Newtonsoft.Json Json.NET is a popular high-performance JSON framework for .NET | |
restsharp/RestSharp |
Version History
Version | Downloads | Last updated |
---|---|---|
4.0.0-beta.1 | 5,196 | 11/20/2020 |
4.0.0-alpha.1 | 40,813 | 7/12/2020 |
3.17.0 | 2,823,102 | 7/11/2020 |
3.17.0-beta.2 | 10,173 | 6/25/2020 |
3.17.0-beta.1 | 72,420 | 4/19/2020 |
3.16.1 | 7,264,247 | 1/18/2020 |
3.16.0 | 661,517 | 1/3/2020 |
3.15.1 | 8,221,519 | 8/30/2019 |
3.15.0 | 345,415 | 8/23/2019 |
3.14.0 | 667,415 | 8/8/2019 |
3.13.0 | 8,089,922 | 2/21/2019 |
3.12.0 | 2,709,052 | 12/19/2018 |
3.11.2 | 1,227,752 | 11/22/2018 |
3.11.1 | 163,356 | 11/21/2018 |
3.11.0 | 3,518,695 | 10/28/2018 |
3.10.0 | 8,385,414 | 3/8/2018 |
3.9.0 | 3,336,133 | 10/30/2017 |
3.8.0 | 1,993,189 | 7/19/2017 |
3.8.0-alpha1 | 197,493 | 5/4/2017 |
3.7.0 | 1,522,031 | 1/26/2017 |
3.6.0 | 477,190 | 11/15/2016 |
3.5.1 | 75,247 | 10/28/2016 |
3.5.0 | 140,372 | 10/23/2016 |
3.4.1 | 402,714 | 8/5/2016 |
3.4.0 | 101,529 | 7/3/2016 |
3.2.0 | 68,764 | 6/4/2016 |
3.0.10 | 85,354 | 4/19/2016 |
3.0.9-ctp-9 | 10,360 | 4/3/2016 |
3.0.8-ctp-8 | 155,829 | 12/2/2015 |
3.0.7-ctp-7b | 4,888 | 11/17/2015 |
3.0.7-ctp-7 | 1,114 | 11/16/2015 |
3.0.6-ctp-6 | 1,402 | 11/11/2015 |
3.0.5-ctp-5 | 891 | 11/10/2015 |
3.0.4-ctp-4 | 5,137 | 7/21/2015 |
3.0.2-ctp-3 | 1,846 | 5/22/2015 |
Cached
Show lessVisual Studio 2017 comes with a great new feature called Live Unit Testing. This feature discovers and runs unit tests while you are coding, giving you inline feedback of which tests are passing, and exactly which lines are covered by the tests. Microsoft office 2013 finalizing installation stuck.
When the tests are passing you see a green tick by each line covered by at least one passing test. Snagit 8 full crack software download.
When it fails you see a red cross for each line covered by the failing test, and lines that aren't covered by any tests have a blue dash.
This is a great way to get rapid feedback about the code you're currently writing. I recently attempted to get it working on a large project that had lots of NUnit tests. It's not too difficult, but there are a number of gotchas that you can run into along the way, so here's my notes for what you need to get Live Unit Testing running successfully on a project with NUnit tests.
- You do need Visual Studio 2017 Enterprise Edition, so unfortunately you can't use this with the free Community Edition.
- You need to be using NUnit 3. Our tests were all in NUnit 2 and unfortunately there were quite a lot of breaking changes to work through.
- When you create a new unit test assembly, it should target either the regular .NET framework (e.g. 4.6.2) or .NET Core. Don't try to put your unit tests in a .NET Standard class library - it doesn't work (perhaps because the NUnit3TestAdapter doesn't support .NET Standard).
- Your unit test assemblies need to reference the NUnit (v3) and NUnit3TestAdapter NuGet packages
- It's not enough to have the NUnit3TestAdapter Visual Studio extension installed - that only makes your NUnit unit tests appear in the Test Explorer window. You also need to add the NUnit3TestAdapter NuGet package to your unit test project.
- If you've created a .NET Core unit test assembly you also need to reference the Microsoft.NET.Test.Sdk NuGet package
- There is actually a
dotnet new
template you can install so that you can easily create a .NET core unit test assembly with the correct references for live testing in NUnit 3 withdotnet new nunit
- There is actually a
- The Visual Studio Output window with 'Live Unit Testing' selected in the dropdown is a good place to look when troubleshooting why Live Unit Testing isn't working for you.
- Live Unit Testing can be started or stopped from the Visual Studio Test menu - it doesn't run automatically.
- You may have some tests you don't want to run as part of the live unit testing. Particularly if they are 'integration' tests that might take a long time to run or communicate with external resources.
- You can right-click on tests, classes and assemblies, and include, exclude, or exclude all but this.
- Unfortunately, these settings are stored on a per-user basis so you can't share these settings with the rest of your team.
- There is a special category you can put your tests in called
SkipWhenLiveUnitTesting
which will exclude them from live testing. It's a shame you can't customize these rules to use the category names you're already using.
- Once you've got it working, I should warn you it's not all plain sailing, especially on a large solution containing thousands of tests. It often seems to get 'stuck' where it's not running tests any more, or claim that tests are 'excluded' without giving clear reasons why. There are also some cryptic errors in my live unit testing output window about an invalid filter syntax, which I don't know how to resolve. The good news is that on smaller projects it seems very responsive, and hopefully some of the quirky issues will get fixed in the near future.
Here's how quick it picks up changes when you're testing in a small project which is really nice and responsive. I don't even need to save the file:
Recommended links for further reading: