Prova is a high-performance, Native AOT-compatible test runner for .NET. Use the xUnit syntax you already know, but with zero runtime reflection and instant startup.
๐ Read the full documentation โ
Your tests remain exactly the same. Prova supports standard xUnit attributes ([Fact], [Theory], [InlineData], Assert). You only change the runner.
Tests are discovered at compile-time using Source Generators and can be compiled to Native AOT. This eliminates runtime discovery costs and enables instant startup, making it ideal for high-frequency "inner loop" development or containerized CI environments.
Tests run in parallel by default (Task.WhenAll), utilizing all available cores.
dotnet add package Provausing Prova;
public class CalculatorTests
{
[Fact]
public void Add_ReturnsSum()
{
Assert.Equal(4, 2 + 2);
}
[Theory]
[InlineData(10, 2, 5)]
[InlineData(20, 4, 5)]
public void Divide_ReturnsQuotient(int a, int b, int expected)
{
Assert.Equal(expected, a / b);
}
}dotnet runProva integrates with the Microsoft Testing Platform. This enables support for dotnet test, TRX reporting, and code coverage without sacrificing AOT compatibility.
dotnet test --coverage --report-trx| Package | Description | NuGet |
|---|---|---|
Prova |
Core framework | |
Prova.AspNetCore |
ASP.NET Core integration | |
Prova.Playwright |
Playwright browser testing | |
Prova.Testcontainers |
Docker container testing | |
Prova.FsCheck |
Property-based testing (FsCheck) |
While Prova is a drop-in replacement, it adds enterprise-grade features for strictly governed codebases.
Prevent thread pool starvation in massive test suites by bounding parallelism.
[Parallel(max: 4)] // Limits concurrency for this class
public class DatabaseTests { ... }Enforce zero-allocation policies or strict memory budgets for critical paths.
[Fact]
[MaxAlloc(0)] // Fails if the test allocates any memory on the heap
public void HotPath_ShouldNotAllocate() { ... }[Fact]
[Retry(3)] // Automatically retry flaky network tests
public void IntegrationTest() { ... }Run only the specific test you are debugging (similar to .only in Jest).
[Fact]
[Focus] // Prova will ONLY generate and run this test
public void DebuggingThisRightNow() { ... }We welcome issues and pull requests. Please see CONTRIBUTING.md for details.
Prova produces clean, hierarchical output that is easy to parse visually.
MIT
