OSS Tanbou

NUnit — express expected .NET behavior with test attributes and assertions

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
2,627
Primary language
C#
License
MIT
Repository last updated
Sep 20, 2026

Overview

NUnit is a testing framework for .NET languages including C#. Tests are defined with attributes and verified with assertions and constraints, covering use cases from unit testing to integration and system tests.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Express test cases with attributes and assertions

Attributes such as [Test] identify tests, while a broad assertion and constraint model expresses expected behavior.

Sources: [2][3]

Combine the framework with dotnet test and IDE adapters

The Framework is separate from Visual Studio Adapter and Console/Engine repositories, allowing projects to choose the runner integration they need.

Sources: [2]

For a shared .NET testing model from TDD to integration tests

It fits teams that want consistent fixtures, assertions, and test conventions across a .NET codebase.

Sources: [2]

Review breaking changes when moving from NUnit 3 or 4 to 5

The README identifies NUnit 5 as the current generation and directs users through documented breaking changes and migration guidance for earlier test suites.

Sources: [2][3]

Official sources

  1. [1]nunit/nunit repository(2026-09-21)
  2. [2]NUnit README(2026-09-21)
  3. [3]NUnit documentation(2026-09-21)
  4. [4]NUnit MIT license(2026-09-21)
Supplemental curator note

This repository is the NUnit Framework used to write tests. Visual Studio/dotnet test adapters, analyzers, and Console/Engine tooling are maintained in separate repositories. The README identifies NUnit 5 as the current generation and points users upgrading from NUnit 3 or 4 to breaking-change and migration guidance.

Try it in 3 steps

  1. 1

    Create an NUnit test project

    Use the .NET CLI template documented by the official NUnit installation guide.

    dotnet new nunit -o TestProject1
  2. 2

    Inspect the generated test

    Review the generated [Test] example and adjust its assertion for the behavior you want to verify.

    Open TestProject1/UnitTest1.cs
  3. 3

    Run it with dotnet test

    Execute the tests through the adapter included by the template and inspect the result.

    dotnet test TestProject1
Check the official README

Growth

Growth trends · Last 30 days

2,627 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
26
Open PRs
10

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • nunit-framework
  • tdd
  • testing
  • test-framework
  • test-driven-development
  • dotnet
  • c-sharp
  • nunit
  • hacktoberfest
Stars
2,627
Forks
766
Watchers
111
Open issues
254
Contributors
232
Primary language
C#
License
MIT
Repository last updated
Sep 20, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.