xUnit.net is a free, open source, community-focused unit testing tool for the .NET Framework. Written by the original inventor of NUnit v2, xUnit.net is the latest technology for unit testing C#, F#, VB.NET and other .NET languages. xUnit.net works with ReSharper/Rider, CodeRush, TestDriven.NET and Xamarin. It is part of the .NET Foundation, and operates under their code of conduct. It is licensed under Apache 2 (an OSI approved license).
Follow: xUnit.net on Mastodon, xUnit.net on BlueSky, James Newkirk, Brad Wilson, Claire Novotny
Discussions are held on our discussions site.
Resharper/Rider support is provided and supported by JetBrains.
CodeRush support is provided and supported by DevExpress.
NCrunch support is provided and supported by Remco Software.
The xUnit.net logo was designed by Nathan Young.
Stable | Latest CI (how to use) | Build status | |
---|---|---|---|
v3 core framework | |||
v2 core framework | |||
xunit.analyzers | |||
xunit.runner.visualstudio |
Stable | Prerelease | ||
---|---|---|---|
v3 core framework | 0.7.0-pre.15 | (all releases) | |
v2 core framework | 2.9.2 | (all releases) | |
xunit.analyzers | 1.17.0 | (all releases) | |
xunit.runner.visualstudio | 2.8.2 | 3.0.0-pre.49 | (all releases) |
New to xUnit.net? These guides will help you get started.
v3 Core Framework (.NET 6+ and .NET Framework 4.7.2+, cross-platform)
IXunitSerializer
and IXunitSerializable
v2 Core Framework
Source Analyzers
xunit.runner.json
)xunit.runner.json
?xunit.runner.visualstudio
xunit.extensions
?The following target frameworks are current supported:
xUnit.net | Console | MSBuild | TestDriven.NET 2 | Visual Studio 3 | |
---|---|---|---|---|---|
.NET Framework (Windows) |
v1, v2, v3 | ✔ 4a | ✔ 4a | ✔ 4a | ✔ 4b |
.NET Core & .NET 5+ (Windows, Linux, macOS) |
v2 (2.2+), v3 | ✔ 4b |
The following target frameworks have been deprecated and are no longer supported:
xUnit.net | Visual Studio 2 | Devices | |
---|---|---|---|
Universal Application (Win/WinPhone 8.1) |
v2 (2.0 - 2.1) | ✔ 4b | ✔ 4c |
Universal Windows Platform | v2 (2.1 - 2.4.2) | ✔ 4b | ✔ 4c |
Windows Phone 8 (Silverlight) | v2 (2.0 - 2.1) | ✔ 4c | |
Xamarin iOS Unified 1 | v2 (2.0 - 2.4.2) | ✔ 4c | |
Xamarin MonoAndroid 1 | v2 (2.0 - 2.4.2) | ✔ 4c | |
Xamarin MonoTouch (iOS Classic) 1 | v2 (2.0 - 2.1) | ✔ 4c |
vstest.console.exe
, and dotnet test
. Express editions of Visual Studio are not supported. Minimum target frameworks for are higher for v2 Core Framework users: NET Framework 4.6.2+ and .NET 6+.For information on contributing to xUnit.net, please read the governance document.
Special thanks to the .NET on AWS Open Source Software Fund for sponsoring the ongoing development of xUnit.net.
Help support this project by becoming a sponsor through GitHub Sponsors.
Portions copyright The Legion Of The Bouncy Castle