thomhurst / TUnit
A modern, fast and flexible .NET testing framework
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing thomhurst/TUnit in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewTUnit 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 to express ordering and to cap concurrency • **Data-driven testing** — , , , and custom sources • **Async assertions** with detailed failure messages • **Built-in Roslyn analyzers** — catch mistakes at compile time, such as missing , incorrect method signatures, and invalid attribute combinations • **Extensible** — write your own skip conditions, retry logic, and attributes • **Native AOT & trimming support** • **Lifecycle hooks** — / at method, class, assembly, or test session scope Getting Started Using the Project Template (Recommended) Manual Installation Getting Started Guide · Migration Guides Examples Basic test with assertions Data-driven tests Hooks, dependencies, and retry Custom attributes Extend built-in base classes to create your own skip conditions, retry logic, and more: See the documentation for more examples, including custom retry logic and data sources. IDE Support | IDE | Notes | |-----|-------| | **Visual Studio 2022 (17.13+)** | Works out of the box | | **Visual Studio 2022 (earlier)** | Enable "Use testing platform server mode" in Tools > Manage Preview Features | | **JetBrains Rider** | Enable "Testing Platform support" in Settings > Build, Execution, Deployment > Unit Testing > Testing Platform | | **VS Code** | Install C# Dev Kit and enable "Use Testing Platform Protocol" | | **CLI** | Works with , , and direct execution | Packages | Package | Purpose | |---------|---------| | | Start here — the full framework (Core + Engine + Assertions) | | | Shared test library components without an execution engine | | | Execution engine for test projects | | | Standalone assertions — works with other test frameworks too | | | Playwright integration with automatic browser lifecycle management | Migrating from xUnit, NUnit, or MSTest? The syntax will feel familiar. For example, xUnit's becomes , and + becomes + . See the migration guides for full details: xUnit · NUnit · MSTest. Community • Documentation — guides, tutorials, and API reference • GitHub Discussions — questions and ideas welcome • Issues — bug reports and feature requests • Changelog