
TUnit
A modern .NET testing framework. Tests are source-generated at compile time, run in parallel by default, and support Native AOT — all built on Microsoft.Testing.Platform.
Features
- Compile-time test discovery — tests are generated at build time rather than discovered via reflection at runtime, which means faster startup and better IDE integration
- Parallel by default — tests run concurrently; use
[DependsOn] to express ordering and [ParallelLimiter] to cap concurrency
- Data-driven testing —
[Arguments], [Matrix], [ClassData], and custom DataSourceGenerator<T> sources
- Async assertions with detailed failure messages
- Built-in Roslyn analyzers — catch mistakes at compile time, such as missing
async, incorrect method signatures, and invalid attribute combinations
- Extensible — write your own skip conditions, retry logic, and attributes
- Native AOT & trimming support
- Lifecycle hooks —
[Before] / [After] at method, class, assembly, or test session scope
Getting Started
Using the Project Template (Recommended)