thomhurst/tunit

A modern, fast and flexible .NET testing framework

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 23 minutes ago
Added to GitGenius on September 17th, 2026
Created on January 24th, 2024
Open Issues & Pull Requests: 18 (+0)
GitHub issues: Enabled
Number of forks: 136
Total Stargazers: 3,957 (+0)
Total Subscribers: 20 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.5 hours
Mean response time: 2.9 days
90th percentile: 3.8 days
Tracked items: 1,236

Most active contributors

Sign in to see contributor activity.

How this project is maintained

Practically every issue opened in the past year has drawn a reply. 98% of issues opened in the past year have since been closed. Three people close 89% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 14
New in 7 days: 6
Closed in 7 days: 6
Avg open age: 155 days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 6
Closed in 7 days: 6
Comments in 7 days: 5
Events in 7 days: 10

Top labels

  • bug (307)
  • enhancement (227)
  • Stale (88)
  • good first issue (50)
  • performance (40)
  • help wanted (27)
  • .NET (22)
  • v2 (12)

Detailed Description

TUnit is a modern .NET testing framework that discovers tests at compile time via source generators, runs tests in parallel by default, and supports Native AOT compilation.

TUnit solves the performance and flexibility limitations of traditional .NET testing frameworks by shifting test discovery from runtime reflection to compile-time source generation. This approach eliminates the startup overhead of scanning assemblies and enables full trimming and Native AOT support. Tests run in parallel by default, with fine-grained control through attributes like DependsOn, NotInParallel, and ParallelLimiter to enforce ordering and concurrency limits where needed. The framework includes Roslyn analyzers that catch common mistakes—invalid hook signatures, broken data sources, misused assertions—at build time rather than in CI. It provides rich async assertions, shared fixtures with dependency injection, lifecycle hooks at multiple scopes, and a source-generated mocking library, with first-class support for ASP.NET Core, Aspire, and Playwright.

Teams should adopt TUnit if they prioritize test execution speed, especially in large test suites or when using Native AOT, and value compile-time safety over runtime flexibility. It suits projects that benefit from parallel test execution and those targeting high-performance scenarios. The framework is particularly valuable for teams already invested in the .NET ecosystem who want to move beyond reflection-based discovery and gain the startup performance benefits of source generation.

The project maintains active development with regular commits to the main branch and a responsive approach to issues and pull requests. The maintainer actively engages with the community through sponsorship options and keeps the framework aligned with Microsoft.Testing.Platform standards.