MSTest.TestFramework 4.5.3

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.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
23
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
18
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
16
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
15
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 - UWP 10.0.17763 with .NET 9+
15
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
15
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
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
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 - UWP 10.0.17763 with .NET 9+
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 8.0+ - .NET 8.0 Windows.18362+ (WinUI) - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
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 8.0+ - .NET 8.0 Windows.18362+ (WinUI) - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
13
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 - UWP 10.0.17763 with .NET 9+
13
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
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

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