CheckOps home

Tools directory

M

CheckOps

MSTest

MSTest is Microsoft's MIT-licensed test framework for .NET, developed in the microsoft/testfx repository alongside Microsoft.Testing.Platform, a lightweight alternative to VSTest, with the MSTest.Sdk project SDK.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

MSTest (Microsoft Test Framework) is the test framework that ships with Visual Studio’s templates and is fully supported on all .NET platforms. Its home is the microsoft/testfx repository, which also hosts Microsoft.Testing.Platform, described as a lightweight alternative to VSTest for running tests, and its extensions.

Tests use attributes: [TestClass] on classes and [TestMethod] on methods, with [DataRow] and [DynamicData] for data-driven tests, [TestInitialize]/[TestCleanup] and class or assembly-level initialisers for fixtures. Modern MSTest versions add analyzers that catch common mistakes, in-assembly parallelisation, timeouts and retries. The MSTest.Sdk MSBuild project SDK greatly simplifies test project files by bringing in the right packages and defaults. Tests run from Visual Studio, VS Code, Rider and dotnet test. Version 4.5.2 was released on 27 October 2026.

The source code is at microsoft/testfx on GitHub under the MIT licence, with about 1,100 stars; the most recent commit was on 11 November 2026.

Features

  1. Built into .NET tooling: Default Visual Studio templates and dotnet new mstest.
  2. Data-driven tests: [DataRow] and [DynamicData].
  3. Microsoft.Testing.Platform: Lightweight runner alternative to VSTest.
  4. Analyzers and parallelism: Catch mistakes and run tests in parallel.

Pros

  1. Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
  2. Actively maintained: The repository had commits as recent as 11 November 2026.

Cons

  1. Less community-driven than xUnit: Many open-source .NET projects prefer xUnit or NUnit.
  2. Two runner models: VSTest and Microsoft.Testing.Platform options can confuse newcomers.
dotnet new mstest -n Shop.Tests
[TestClass]
public class PricingTests
{
    [TestMethod]
    [DataRow(100, 0, 100)]
    [DataRow(100, 10, 90)]
    public void AppliesDiscount(int price, int pct, int expected)
    {
        Assert.AreEqual(expected, Pricing.Apply(price, pct));
    }

    [TestMethod]
    public void RejectsNegativePrices()
    {
        Assert.ThrowsExactly<ArgumentOutOfRangeException>(() => Pricing.Apply(-1, 0));
    }
}
dotnet test

Resources:

Pricing

MSTest is free and open source under the MIT licence.

  1. .NET teams standardised on Microsoft tooling and Visual Studio.
  2. Projects wanting first-party support and the modern Microsoft.Testing.Platform.

Conclusion

MSTest is a modern, actively developed first-party .NET test framework, a safe default for Microsoft-centric teams.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with MSTest side by side.