NUnit 4.2.2
Prefix ReservedRequires NuGet 2.12 or higher.
dotnet add package NUnit --version 4.2.2
NuGet\Install-Package NUnit -Version 4.2.2
<PackageReference Include="NUnit" Version="4.2.2" />
paket add NUnit --version 4.2.2
#r "nuget: NUnit, 4.2.2"
// Install NUnit as a Cake Addin #addin nuget:?package=NUnit&version=4.2.2 // Install NUnit as a Cake Tool #tool nuget:?package=NUnit&version=4.2.2
NUnit 4 Framework
NUnit is a unit-testing framework for all .NET languages. It can run on macOS, Linux and Windows operating systems. NUnit can be used for a wide range of testing, from unit testing with TDD to full fledged system and integration testing. It is a non-opinionated, broad and deep framework with multiple different ways to assert that your code behaves as expected. Many aspects of NUnit can be extended to suit your specific purposes.
The latest version, version 4, is an upgrade from the groundbreaking NUnit 3 framework. It is a modernized version, aimed at taking advantage of the latest .NET features and C# language constructs.
If you are upgrading from NUnit 3, be aware of the breaking changes. Please see the NUnit 4 Migration Guide and take care to prepare your NUnit 3 code before you do the upgrade.
Table of Contents
Downloads
The latest stable release of the NUnit Framework is available on NuGet or can be downloaded from GitHub. Pre-release builds are available on MyGet.
Documentation
Documentation for all NUnit projects can be found at the documentation site.
Contributing
For more information on contributing to the NUnit project, please see CONTRIBUTING.md and the Developer Docs.
NUnit 3.0 was created by Charlie Poole, Rob Prouse, Simone Busoli, Neil Colvin and numerous community contributors. A complete list of contributors since NUnit migrated to GitHub can be found on GitHub.
Earlier versions of NUnit were developed by Charlie Poole, James W. Newkirk, Alexei A. Vorontsov, Michael C. Two and Philip A. Craig.
License
NUnit is Open Source software and NUnit 4 is released under the MIT license. Earlier releases used the NUnit license. Both of these licenses allow the use of NUnit in free and commercial applications and libraries without restrictions.
NUnit Projects
NUnit is made up of several projects. When reporting issues, please try to report issues in the correct project.
Core Projects
- NUnit Test Framework - The test framework used to write NUnit tests (this repository)
- NUnit Visual Studio Adapter - Visual Studio/Dotnet adapter for running NUnit 3 and 4 tests in Visual Studio or the
dotnet
command line. - NUnit Console and Engine - Runs unit tests from the command line and provides the engine that is used by other test runners to run NUnit tests.
Visual Studio Extensions
- NUnit Visual Studio Adapter - Visual Studio adapter for running NUnit 3 and 4 tests in Visual Studio or the
dotnet
command line. - NUnit Visual Studio Templates - Project templates and snippets for writing unit tests in Visual Studio. This repo is for reference only, as the templates have been donated to the Dotnet project and are maintained there, and also released as part of the dotnet releases.
- Visual Studio Test Generator - Generates NUnit tests in Visual Studio
- NUnit 2 Visual Studio Adapter - Visual Studio adapter for running older NUnit 2.x tests in Visual Studio and in VSTS/TFS builds
NUnit Engine Extensions
- NUnit 2 Driver - Allows the NUnit 3 engine to run NUnit 2 tests
- NUnit 2 Result Writer - Writes test results in the legacy NUnit 2 format
- Visual Studio Project Loader - Loads and parses Visual Studio projects and solutions
- NUnit Project Loader - Loads NUnit projects
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- System.Memory (>= 4.5.5)
- System.Threading.Tasks.Extensions (>= 4.5.4)
- System.ValueTuple (>= 4.5.0)
-
net6.0
- No dependencies.
NuGet packages (1.2K)
Showing the top 5 NuGet packages that depend on NUnit:
Package | Downloads |
---|---|
SpecFlow.NUnit
Package to use SpecFlow with NUnit 3.13 and later |
|
Xamarin.UITest
UI Automation Framework for testing Android and iOS apps. |
|
AutoFixture.NUnit3
By leveraging some features of NUnit3, this extension turns AutoFixture into a declarative framework for writing unit tests. In many ways it becomes a unit testing DSL (Domain Specific Language). |
|
NUnitLite
NUnitLite provides a simple way to run NUnit tests, without the overhead of a full NUnit installation. It is suitable for projects that want to have a quick way to run tests using a console runner and don't need all the features of the NUnit engine and console runner. Supported platforms: - .NET Framework 4.6.2+ - .NET 6.0+ How to use this package: 1. Create a console application for your tests and delete the generated class containing Main(). 2. Install the NUnitLite package, which creates a new Main() as well as adding a reference to NUnitLite. This will also bring in the NUnit package, which adds a reference to the NUnit framework to your project. 3. Add your tests to the test project and simply start the project to execute them. |
|
Microsoft.Playwright.NUnit
Playwright enables reliable end-to-end testing for modern web apps. This package brings in additional helpers and fixtures to enable using it within NUnit. |
GitHub repositories (1.4K)
Showing the top 5 popular GitHub repositories that depend on NUnit:
Repository | Stars |
---|---|
Ryujinx/Ryujinx
Experimental Nintendo Switch Emulator written in C#
|
|
AvaloniaUI/Avalonia
Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
|
|
dotnet/maui
.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
|
|
icsharpcode/ILSpy
.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
|
|
BeyondDimension/SteamTools
🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。
|
Version | Downloads | Last updated |
---|---|---|
4.2.2 | 3,109 | 8/31/2024 |
4.2.1 | 113,692 | 8/23/2024 |
4.1.0 | 8,012,751 | 2/25/2024 |
4.0.1 | 4,882,429 | 12/2/2023 |
3.14.0 | 8,051,320 | 11/3/2023 |
3.13.3 | 77,773,679 | 3/20/2022 |
3.13.2 | 45,020,074 | 4/27/2021 |
3.13.1 | 18,668,377 | 2/1/2021 |
3.13.0 | 7,521,773 | 1/7/2021 |
3.12.0 | 76,781,768 | 5/15/2019 |
3.11.0 | 28,784,847 | 10/7/2018 |
3.10.1 | 18,687,657 | 3/13/2018 |
3.10.0 | 445,992 | 3/13/2018 |
3.9.0 | 9,510,654 | 11/10/2017 |
3.8.1 | 16,811,751 | 8/29/2017 |
3.8.0 | 346,147 | 8/28/2017 |
3.7.1 | 4,022,660 | 6/6/2017 |
3.7.0 | 1,604,255 | 5/30/2017 |
3.6.1 | 5,994,518 | 2/26/2017 |
3.6.0 | 2,814,883 | 1/10/2017 |
3.5.0 | 4,651,848 | 10/4/2016 |
3.4.1 | 2,658,206 | 6/30/2016 |
3.4.0 | 156,546 | 6/25/2016 |
3.2.1 | 1,337,579 | 4/19/2016 |
3.2.0 | 969,719 | 3/5/2016 |
3.0.1 | 1,926,520 | 12/2/2015 |
3.0.0 | 928,932 | 11/16/2015 |
3.0.0-rc-3 | 11,531 | 11/14/2015 |
3.0.0-rc-2 | 12,073 | 11/8/2015 |
3.0.0-rc | 13,026 | 11/1/2015 |
3.0.0-beta-5 | 21,059 | 10/17/2015 |
3.0.0-beta-4 | 18,132 | 8/25/2015 |
3.0.0-beta-3 | 18,972 | 7/15/2015 |
3.0.0-beta-2 | 24,578 | 5/13/2015 |
3.0.0-beta-1 | 15,479 | 3/26/2015 |
3.0.0-alpha-5 | 24,761 | 1/31/2015 |
3.0.0-alpha-4 | 15,018 | 12/31/2014 |
3.0.0-alpha-3 | 14,171 | 11/29/2014 |
3.0.0-alpha-2 | 28,043 | 11/3/2014 |
3.0.0-alpha | 23,877 | 9/23/2014 |
2.7.1 | 516,319 | 8/21/2019 |
2.7.0 | 273,492 | 8/10/2018 |
2.6.7 | 150,045 | 7/7/2018 |
2.6.6 | 36,647 | 6/7/2018 |
2.6.5 | 120,818 | 4/20/2018 |
2.6.4 | 14,420,499 | 12/17/2014 |
2.6.3 | 6,674,055 | 10/11/2013 |
2.6.2 | 2,892,145 | 10/23/2012 |
2.6.1 | 470,897 | 8/5/2012 |
2.6.0.12054 | 757,335 | 2/24/2012 |
2.5.10.11092 | 1,035,953 | 4/25/2011 |
2.5.9.10348 | 180,534 | 2/9/2011 |
2.5.7.10213 | 746,121 | 1/7/2011 |