Skip to main content
.NETFramework4.6.2net8.0net8.0-windows10.0.18362net9.0net9.0-windows10.0.17763UAP10.0.16299

This package includes the adapter logic to discover and run tests. For access to the testing framework, install the MSTest.TestFramework package. Supported platforms: - .NET 4.6.2+ - .NET 8.0+ - .NET 8.0 Windows.18362+ (WinUI) - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9 MSTest is Microsoft supported Test Framework.

Published
Oct 27, 2026
6d ago
Total Downloads
487.1M
487,068,625

Install

dotnet add package MSTest.TestAdapter --version 4.5.2
ProductVersions
.NET
net8.0net8.0-windows10.0.18362net9.0net9.0-windows10.0.17763
Universal Windows Platform
uap10.0.16299
Other
.NETFramework4.6.2

README

MSTest.TestAdapter

MSTest is Microsoft supported Test Framework.

This package includes the adapter logic to discover and run tests. For access to the testing framework, install the MSTest.TestFramework package.

Getting started

After referencing both MSTest.TestAdapter and MSTest.TestFramework, define tests with [TestClass] and [TestMethod]:

using Microsoft.VisualStudio.TestTools.UnitTesting;

[TestClass]
public class CalculatorTests
{
    [TestMethod]
    public void AddReturnsExpectedResult()
        => Assert.AreEqual(4, 2 + 2);
}

Supported platforms:

  • .NET 4.6.2+
  • .NET 8.0+
  • .NET 8.0 Windows.18362+ (WinUI)
  • UWP 10.0.16299
  • UWP 10.0.17763 with .NET 9+

Runsettings on Microsoft.Testing.Platform

When using the MSTest runner on Microsoft.Testing.Platform, .runsettings files can configure MSTest through the MSTest section (or its MSTestV2 alias), test parameters through TestRunParameters, and supported settings through RunConfiguration.

VSTest ISettingsProvider extensions are not invoked. Other top-level sections, such as Playwright, produce a warning and are not applied by MSTest. Use the extension's native Microsoft.Testing.Platform configuration when available. VSTest loggers, data collectors, and unsupported RunConfiguration entries retain their own warnings.

Documentation

For installation and configuration guidance, see https://learn.microsoft.com/dotnet/core/testing/unit-testing-mstest-getting-started.

For information about running tests, see https://learn.microsoft.com/dotnet/core/testing/unit-testing-mstest-running-tests.

Changes from Previous Version

No structural changes between v4.5.1 and v4.5.2.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 6 target frameworks; confirm the exact target used by your application.The published metadata declares 34 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.