NUnit
The long-standing .NET test framework with the richest assertion set.
Unit & ComponentOpen sourceSelf-hostable
What it is
NUnit is the oldest of the .NET unit testing frameworks and remains widely used, with a comprehensive constraint-based assertion model, flexible setup/teardown attributes and strong parameterised-test support. It runs everywhere .NET runs.
Best for
Existing .NET codebases already standardised on NUnit.
Where it is strong
- The most expressive built-in assertion library in .NET.
- Familiar attribute model for teams migrating from older frameworks.
- Very stable, very long-lived.
Where it falls short
- Shared test-class instances mean state can leak between tests unless you are careful.
- New Microsoft templates default to xUnit, so it is drifting from the mainstream.
- Attribute-heavy style feels dated.
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
dotnet testVisual StudioAzure DevOpsMoqJenkins
What people who use NUnit say
No reviews of NUnit yet. If you have used it in anger, yours would be the first.
Alternatives to NUnit
If NUnit is not the right fit, these solve the same problem differently.