NUnit 4.0.0Prefix Reserved
Requires NuGet 2.12 or higher.
dotnet add package NUnit --version 4.0.0
NuGet\Install-Package NUnit -Version 4.0.0
<PackageReference Include="NUnit" Version="4.0.0" />
paket add NUnit --version 4.0.0
#r "nuget: NUnit, 4.0.0"
// Install NUnit as a Cake Addin #addin nuget:?package=NUnit&version=4.0.0 // Install NUnit as a Cake Tool #tool nuget:?package=NUnit&version=4.0.0
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.
Table of Contents
Documentation for all NUnit projects can be found at the documentation site.
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.
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 is made up of several projects. When reporting issues, please try to report issues in the correct project.
- 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
- 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
- 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
|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-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.|
- No dependencies.
- No dependencies.
NuGet packages (1.1K)
Showing the top 5 NuGet packages that depend on NUnit:
Twilio REST API helper library
Package to use SpecFlow with NUnit 3.13 and later
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 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.
GitHub repositories (1.3K)
Showing the top 5 popular GitHub repositories that depend on NUnit:
Experimental Nintendo Switch Emulator written in C#
Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET Foundation community project.
.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。