TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source generation for test discovery and mock creation, ensuring compatibility with Native AOT and IL trimming by eliminating the need for runtime reflection and proxies.
The framework provides specialized capabilities for integration testing, including the management of distributed application lifecycles, isolated database schemas, and the correlation of telemetry and logs across process boundaries via OTLP. It also includes an HTTP testing utility to intercept network exchanges and mock API responses.
Broad capability areas cover data-driven testing with combinatorial generation, a type-safe fluent assertion library for validating complex states, and a sophisticated dependency injection system for managing shared test resources. The toolset also includes observability features such as distributed trace visualization and detailed HTML reporting.
The project provides a command-line interface and integrates with standard IDE test runners and CI/CD pipelines.