
MSTest
MSTest is a free, open-source framework for writing and running tests for .NET applications.
What MSTest is
MSTest is a free, open-source framework for writing and running tests for .NET applications. It works across Linux, macOS, and Windows, and supports C#, F#, and Visual Basic. Tests can run from Visual Studio, Visual Studio Code, JetBrains Rider, the .NET CLI, GitHub Actions, or Azure DevOps. Data-driven tests can use DataRow, CombinatorialData, DynamicData, or external data sources. Other features include setup and cleanup hooks, parallel execution, test categorization and filtering, analyzers, and assertion methods. MSTest supports both VSTest and Microsoft.Testing.Platform, with Microsoft.Testing.Platform recommended for new projects. Its NuGet meta-package simplifies references to the recommended MSTest packages. Documented targets include .NET 8 and later, .NET Framework 4.6.2 and later, UWP, WinUI 3, Native AOT, and .NET 10 browser and WASI WebAssembly hosts, though available features vary by target. Native AOT has a limited feature set, and WebAssembly has specific test-timeout and debugger constraints. Microsoft supports only the latest released MSTest version.
Good
- Works with Visual Studio, VS Code, Rider, and .NET CLI.
- Supports data-driven tests and parallel execution.
- Integrates with GitHub Actions and Azure DevOps.
- Free and open source.
Watch out
- Available features differ by target framework.
- Native AOT support has a limited feature set.
- Microsoft supports only the latest released version.
- WebAssembly runtimes have timeout and debugger constraints.
Who it suits
MSTest suits .NET developers writing tests in C#, F#, or Visual Basic across supported platforms. It can fit workflows using IDEs, the command line, or CI pipelines.
Verdict
MSTest offers .NET test authoring and execution across multiple platforms, IDEs, and CI options. Check target-specific feature differences and version support when choosing it.
Plans and prices
From MSTest's own pricing page, checked 4 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| MSTest | Free | Open-source .NET test framework · distributed as NuGet packages |
The facts
Each one read from MSTest's own pages, with the date it was checked.
What it does
- AOT limit
- Native AOT is supported with a limited feature set because of reduced reflection capabilities.checked 4 Oct 2026
- Data-driven tests
- MSTest supports multiple test inputs through DataRow, CombinatorialData, DynamicData, and external data sources.checked 4 Oct 2026
- Execution engines
- MSTest supports VSTest and Microsoft.Testing.Platform, with Microsoft.Testing.Platform recommended for new projects.checked 4 Oct 2026
- IDE and CI options
- Tests can be run from Visual Studio, Visual Studio Code, JetBrains Rider, the command line, GitHub Actions, or Azure DevOps.checked 4 Oct 2026
- Package setup
- The MSTest NuGet meta-package simplifies referencing the recommended MSTest packages.checked 4 Oct 2026
- Purpose
- MSTest is a Microsoft-supported, open-source, cross-platform test framework for writing and running tests for .NET applications.checked 4 Oct 2026
- Security and updates
- The MSTest team encourages users to update to the latest version for improvements and security patches.checked 4 Oct 2026
- Supported targets
- Documented targets include .NET 8 and later, .NET Framework 4.6.2 and later, UWP, WinUI 3, Native AOT, and .NET 10 browser and WASI WebAssembly hosts, with feature differences by target.checked 4 Oct 2026
- Support policy
- Microsoft supports only the latest released MSTest version; preview releases are offered for public testing but are not supported.checked 4 Oct 2026
- Test controls
- Features include setup and cleanup lifecycle hooks, parallel execution, test categorization and filtering, analyzers, and assertion methods.checked 4 Oct 2026
- Test integrations
- It integrates with Visual Studio and Visual Studio Code Test Explorers, the .NET CLI, and CI pipelines.checked 4 Oct 2026
- UI testing limit
- Windows desktop UI automation is documented for .NET 8+ Windows targets, while UWP and WinUI 3 UI tests require UI-thread access.checked 4 Oct 2026
- WebAssembly limit
- On single-threaded WebAssembly runtimes, MSTest cannot forcibly interrupt timed-out tests, and debugger wait is unsupported.checked 4 Oct 2026





