xUnit.net
The modern .NET testing framework, and the one Microsoft's templates default to.
What it is
xUnit.net rethought NUnit's design for .NET: a new instance per test for isolation, constructor and IDisposable instead of setup/teardown attributes, and theories for data-driven tests. It integrates with dotnet test, Visual Studio and every .NET CI runner.
Best for
Where it is strong
- Per-test instance isolation eliminates a whole class of shared-state bugs by design.
- Idiomatic modern C# — no attribute soup.
- The default in current .NET project templates.
Where it falls short
- Fewer built-in assertions than NUnit; most teams add FluentAssertions.
- The isolation model surprises developers migrating from NUnit.
- Parallelism defaults occasionally bite on integration tests.
Pricing
Free and open source
Open sourceFree tier: Everything, self-hosted
What drives the bill: Free and open source. You pay in engineering time and CI minutes.
Check current pricing on .NET Foundation’s siteFigures are indicative and were last reviewed August 2026. Vendors change pricing often; confirm before you commit.
Works with
What people who use xUnit.net say
No reviews of xUnit.net yet. If you have used it in anger, yours would be the first.
Alternatives to xUnit.net
If xUnit.net is not the right fit, these solve the same problem differently.
