⚡ Parallelism
Prova is designed for maximum performance through non-blocking, asynchronous parallelism. By default, Prova runs tests across all available CPU cores.
🛠️ Concurrency Control
While Prova encourages thread-safe tests, some scenarios require restricted concurrency.
[Parallel(n)]
Limit the number of concurrent tests within a specific class.
[Parallel(2)] // Only 2 tests in this class run at once
public class DatabaseTests { ... }NOTE
Unlike other frameworks, a class-level [Parallel(1)] in Prova does not stop other classes from running in parallel. It only serializes tests within that specific class.
[Serial]
A convenient alias for [Parallel(1)]. Ensures that tests in the marked class run one after another.
[Serial]
public class IntegrationTests { ... }[DoNotParallelize]
The "nuclear option" for tests that are not thread-safe at a global level (e.g., modifying static state or environment variables).
When a test marked with [DoNotParallelize] runs, Prova:
- Waits for all currently running tests to complete.
- Executes the isolated test alone.
- Resumes parallel execution for remaining tests.
[Fact, DoNotParallelize]
public void EnvironmentSensitiveTest() { ... }⚙️ Global Limits
By default, Prova uses Environment.ProcessorCount as the global concurrency limit. This ensures your machine stays responsive while running thousands of tests.