MSTest.TestFramework 4.5.2

MSTest.TestFramework

MSTest is Microsoft supported Test Framework.

This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package.

Getting started

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+ (WinUI)
  • .NET 6.0 Windows.18362+
  • UWP 10.0.16299
  • UWP 10.0.17763 with .NET 9

Documentation

Naming data-driven test cases

Use ArgumentsDisplayName to label a data row while retaining the test method's display name:

[TestMethod(DisplayName = "Parse")]
[DataRow("", ArgumentsDisplayName = "empty input")]
public void ParseReturnsNull(string input)
{
    // Displayed as: Parse (empty input)
}

For dynamic data or a custom ITestDataSource, use the same property on TestDataRow<T>, for example new TestDataRow<string>("") { ArgumentsDisplayName = "empty input" }. Use matching MSTest.TestFramework and MSTest.TestAdapter versions that support this property; older adapters do not apply TestDataRow<T> argument labels.

DisplayName still replaces the entire test case name and takes precedence over ArgumentsDisplayName. A null, empty, or whitespace-only argument label leaves the existing naming behavior unchanged. Other labels are displayed verbatim, not interpreted as templates. On TestDataRow<T>, an argument label takes precedence over a data source's custom display-name callback.

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

For test authoring guidance, see https://learn.microsoft.com/dotnet/core/testing/unit-testing-mstest-writing-tests.

Showing the top 20 packages that depend on MSTest.TestFramework.

Packages Downloads
MSTest
A meta package to simplify test projects. Supported platforms: - .NET 4.5.0+ - .NET Core 1.0+ (Universal Windows Apps 10+) (Visual Studio 2017) - .NET 5.0 (Visual Studio 2019) - .NET 5.0 Windows.18362+ (WinUI Desktop Apps) (Visual Studio 2019) - ASP.NET Core 1.0+ (Visual Studio 2017)
17
MSTest
A meta package to simplify test projects. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ (Universal Windows Apps 10+) - .NET 6.0 - .NET 6.0 Windows.18362+ - ASP.NET Core 1.0+
16
MSTest
A meta package to simplify test projects. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ (Universal Windows Apps 10+) - .NET 6.0 - .NET 6.0 Windows.18362+ - ASP.NET Core 1.0+
15
MSTest
A meta package to simplify test projects. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ (Universal Windows Apps 10+) - .NET 5.0 - .NET 5.0 Windows.18362+ - ASP.NET Core 1.0+
14
MSTest
A meta package to simplify test projects. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ (Universal Windows Apps 10+) - .NET 6.0 - .NET 6.0 Windows.18362+ - ASP.NET Core 1.0+
14
MSTest
MSTest is Microsoft supported Test Framework. This package is a meta package to simplify test projects. It includes MSTest.TestFramework and MSTest.TestAdapter. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ - .NET 6.0 - .NET 6.0 Windows.18362+ - UWP 10.0.16299
13
MSTest
A meta package to simplify test projects. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ (Universal Windows Apps 10+) - .NET 6.0 - .NET 6.0 Windows.18362+ - ASP.NET Core 1.0+
13
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. 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
11
MSTest
MSTest is Microsoft supported Test Framework. This package is a meta package to simplify test projects. It includes MSTest.TestFramework and MSTest.TestAdapter. 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+
11
MSTest
A meta package to simplify test projects. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ (Universal Windows Apps 10+) - .NET 6.0 - .NET 6.0 Windows.18362+ - ASP.NET Core 1.0+
10
MSTest
MSTest is Microsoft supported Test Framework. This package is a meta package to simplify test projects. It includes MSTest.TestFramework and MSTest.TestAdapter. 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+
10
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. 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
9
MSTest
MSTest is Microsoft supported Test Framework. This package is a meta package to simplify test projects. It includes MSTest.TestFramework and MSTest.TestAdapter. 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+
9
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. 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
8

See the release notes at https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#4.5.2.

.NET Framework 4.6.2

.NET 8.0

.NET 8.0

.NET 9.0

.NET 9.0

.NET Standard 2.0

UAP 10.0.16299

Version Downloads Last updated
4.5.3 0 11/11/2026
4.5.2 5 11/01/2026
4.5.1 5 10/20/2026
4.4.1 11 09/24/2026
4.4.0 10 09/15/2026
4.3.3 5 07/31/2026
4.3.2 12 07/26/2026
4.3.0 12 07/26/2026
4.2.3 9 05/24/2026
4.2.2 10 05/24/2026
4.2.1 13 04/09/2026
4.1.0 12 02/17/2026
4.0.2 4 12/11/2025
4.0.1 5 12/17/2025
4.0.0 5 12/17/2025
4.0.0-preview.25480.4 1 12/30/2025
4.0.0-preview.25465.3 1 12/27/2025
4.0.0-preview.25454.2 2 12/30/2025
4.0.0-preview.25452.10 1 12/29/2025
4.0.0-preview.25415.9 1 12/27/2025
4.0.0-preview.25372.6 1 12/27/2025
4.0.0-preview.25358.7 1 12/27/2025
3.11.1 6 12/17/2025
3.11.0 4 12/17/2025
3.10.5 4 12/17/2025
3.10.4 9 12/17/2025
3.10.3 5 12/17/2025
3.10.2 5 12/17/2025
3.10.1 5 12/17/2025
3.10.0 6 12/17/2025
3.9.3 5 12/17/2025
3.9.2 4 12/17/2025
3.9.1 4 12/17/2025
3.9.0 4 12/17/2025
3.9.0-preview.25167.10 1 12/29/2025
3.8.3 4 12/17/2025
3.8.2 3 12/17/2025
3.8.1 11 12/17/2025
3.8.0 5 12/17/2025
3.7.3 6 12/17/2025
3.7.2 6 12/17/2025
3.7.1 6 12/17/2025
3.7.0 4 12/17/2025
3.6.4 5 12/17/2025
3.6.3 5 12/17/2025
3.6.2 4 12/17/2025
3.6.1 5 12/17/2025
3.6.0 6 12/17/2025
3.5.2 3 12/17/2025
3.5.1 4 12/17/2025
3.5.0 6 12/17/2025
3.5.0-preview.24325.7 1 12/27/2025
3.4.3 5 12/17/2025
3.4.2 4 12/17/2025
3.4.1 6 12/17/2025
3.4.0 3 12/17/2025
3.3.1 5 12/17/2025
3.3.0 5 12/17/2025
3.3.0-preview.24164.4 1 12/27/2025
3.2.2 5 12/17/2025
3.2.1 3 12/17/2025
3.2.0 6 12/17/2025
3.2.0-preview.24069.3 1 12/27/2025
3.2.0-preview.23623.1 1 12/30/2025
3.2.0-preview.23622.1 1 12/30/2025
3.1.1 13 12/17/2025
3.0.4 8 12/17/2025
3.0.3 13 12/17/2025
3.0.2 12 12/17/2025
3.0.1 11 12/17/2025
3.0.0 13 12/17/2025
3.0.0-preview-20221122-01 11 12/17/2025
3.0.0-preview-20221110-04 13 12/17/2025
2.3.0-preview-20220810-02 10 12/17/2025
2.2.10 12 12/11/2025
2.2.10-preview-20220414-01 10 12/31/2025
2.2.9 12 12/17/2025
2.2.9-preview-20220210-07 16 12/17/2025
2.2.8 15 12/17/2025
2.2.7 11 12/17/2025
2.2.6 14 12/17/2025
2.2.5 7 12/17/2025
2.2.5-preview-20210605-01 13 12/17/2025
2.2.5-preview-20210604-01 8 12/17/2025
2.2.5-preview-20210531-02 7 12/17/2025
2.2.4 13 12/17/2025
2.2.4-preview-20210513-02 10 12/17/2025
2.2.4-preview-20210331-02 11 12/17/2025
2.2.3 8 12/17/2025
2.2.2 12 12/17/2025
2.2.1 12 12/17/2025
2.2.0-preview-20210115-03 8 12/17/2025
2.2.0-preview-20201126-03 11 12/17/2025
2.1.2 12 12/17/2025
2.1.1 14 12/17/2025
2.1.0 12 12/17/2025
2.1.0-beta2 10 01/25/2026
2.1.0-beta 16 12/17/2025
2.0.0 13 12/17/2025
2.0.0-beta4 13 01/23/2026
2.0.0-beta2 11 01/24/2026
1.4.0 11 12/17/2025
1.4.0-beta 12 12/17/2025
1.3.2 13 12/17/2025
1.3.1 14 12/17/2025
1.3.0 13 12/17/2025
1.3.0-beta2 11 01/24/2026
1.2.1 10 12/17/2025
1.2.0 14 12/17/2025
1.2.0-beta3 12 01/24/2026
1.2.0-beta 12 12/17/2025
1.1.18 11 12/17/2025
1.1.17 14 12/17/2025
1.1.14 13 12/17/2025
1.1.13 12 12/17/2025
1.1.11 12 12/17/2025
1.0.8-rc2 9 01/23/2026
1.0.8-rc 14 12/17/2025
1.0.7-preview 15 12/17/2025
1.0.6-preview 8 12/17/2025
1.0.5-preview 16 12/17/2025
1.0.4-preview 12 12/17/2025
1.0.3-preview 13 12/17/2025
1.0.1-preview 11 12/17/2025
1.0.0-preview 15 12/17/2025