MSTest.TestFramework 4.5.1
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
|
57 |
|
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
|
53 |
|
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
|
52 |
|
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
|
49 |
|
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
|
48 |
|
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
|
45 |
|
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
|
43 |
|
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
|
39 |
|
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
|
30 |
|
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
|
27 |
|
MSTest.TestAdapter
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.
|
22 |
|
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
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.
|
18 |
|
MSTest.TestAdapter
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.
|
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
|
6 |
See the release notes at https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#4.5.1.
.NET Framework 4.6.2
- MSTest.Analyzers (>= 4.5.1)
.NET 8.0
- MSTest.Analyzers (>= 4.5.1)
.NET 8.0
- MSTest.Analyzers (>= 4.5.1)
.NET 9.0
- MSTest.Analyzers (>= 4.5.1)
.NET 9.0
- MSTest.Analyzers (>= 4.5.1)
.NET Standard 2.0
- MSTest.Analyzers (>= 4.5.1)
UAP 10.0.16299
- MSTest.Analyzers (>= 4.5.1)
| Version | Downloads | Last updated |
|---|---|---|
| 4.5.1 | 13 | 10/07/2026 |
| 4.4.1 | 22 | 09/17/2026 |
| 4.4.0 | 26 | 09/03/2026 |
| 4.3.3 | 24 | 07/30/2026 |
| 4.3.2 | 27 | 07/13/2026 |
| 4.3.0 | 21 | 07/13/2026 |
| 4.2.3 | 45 | 05/15/2026 |
| 4.2.2 | 39 | 04/30/2026 |
| 4.2.1 | 44 | 04/10/2026 |
| 4.1.0 | 42 | 02/05/2026 |
| 4.0.2 | 44 | 12/11/2025 |
| 4.0.1 | 4 | 10/03/2026 |
| 4.0.0 | 43 | 12/22/2025 |
| 4.0.0-preview.25480.4 | 47 | 12/29/2025 |
| 4.0.0-preview.25465.3 | 40 | 12/13/2025 |
| 4.0.0-preview.25454.2 | 41 | 12/22/2025 |
| 4.0.0-preview.25452.10 | 6 | 10/03/2026 |
| 4.0.0-preview.25415.9 | 53 | 12/14/2025 |
| 4.0.0-preview.25372.6 | 53 | 12/15/2025 |
| 4.0.0-preview.25358.7 | 4 | 10/04/2026 |
| 3.11.1 | 54 | 12/15/2025 |
| 3.11.0 | 47 | 12/12/2025 |
| 3.10.5 | 51 | 12/15/2025 |
| 3.10.4 | 42 | 12/22/2025 |
| 3.10.3 | 34 | 12/15/2025 |
| 3.10.2 | 42 | 12/13/2025 |
| 3.10.1 | 52 | 12/16/2025 |
| 3.10.0 | 39 | 12/12/2025 |
| 3.9.3 | 47 | 12/13/2025 |
| 3.9.2 | 43 | 12/16/2025 |
| 3.9.1 | 47 | 12/29/2025 |
| 3.9.0 | 62 | 12/14/2025 |
| 3.9.0-preview.25167.10 | 42 | 12/20/2025 |
| 3.8.3 | 47 | 12/12/2025 |
| 3.8.2 | 59 | 12/12/2025 |
| 3.8.1 | 42 | 12/29/2025 |
| 3.8.0 | 40 | 12/13/2025 |
| 3.7.3 | 52 | 12/13/2025 |
| 3.7.2 | 41 | 12/11/2025 |
| 3.7.1 | 33 | 12/29/2025 |
| 3.7.0 | 46 | 12/16/2025 |
| 3.6.4 | 3 | 10/08/2026 |
| 3.6.3 | 48 | 12/22/2025 |
| 3.6.2 | 41 | 12/13/2025 |
| 3.6.1 | 49 | 12/13/2025 |
| 3.6.0 | 39 | 12/29/2025 |
| 3.5.2 | 36 | 12/18/2025 |
| 3.5.1 | 39 | 12/17/2025 |
| 3.5.0 | 25 | 12/16/2025 |
| 3.5.0-preview.24325.7 | 37 | 12/20/2025 |
| 3.4.3 | 39 | 12/17/2025 |
| 3.4.2 | 34 | 12/13/2025 |
| 3.4.1 | 26 | 12/29/2025 |
| 3.4.0 | 32 | 12/13/2025 |
| 3.3.1 | 49 | 12/23/2025 |
| 3.3.0 | 42 | 12/29/2025 |
| 3.3.0-preview.24164.4 | 49 | 12/20/2025 |
| 3.2.2 | 29 | 12/29/2025 |
| 3.2.1 | 32 | 12/29/2025 |
| 3.2.0 | 3 | 10/08/2026 |
| 3.2.0-preview.24069.3 | 4 | 10/06/2026 |
| 3.2.0-preview.23623.1 | 43 | 12/12/2025 |
| 3.2.0-preview.23622.1 | 42 | 12/20/2025 |
| 3.1.1 | 46 | 12/13/2025 |
| 3.0.4 | 53 | 12/20/2025 |
| 3.0.3 | 3 | 10/03/2026 |
| 3.0.2 | 52 | 12/29/2025 |
| 3.0.1 | 34 | 01/05/2026 |
| 3.0.0 | 32 | 12/29/2025 |
| 3.0.0-preview-20221122-01 | 39 | 12/20/2025 |
| 3.0.0-preview-20221110-04 | 28 | 12/20/2025 |
| 2.3.0-preview-20220810-02 | 49 | 12/20/2025 |
| 2.2.10 | 36 | 12/13/2025 |
| 2.2.10-preview-20220414-01 | 42 | 12/20/2025 |
| 2.2.9 | 48 | 12/11/2025 |
| 2.2.9-preview-20220210-07 | 51 | 12/13/2025 |
| 2.2.8 | 38 | 12/29/2025 |
| 2.2.7 | 36 | 12/14/2025 |
| 2.2.6 | 25 | 12/29/2025 |
| 2.2.5 | 47 | 12/29/2025 |
| 2.2.5-preview-20210605-01 | 39 | 12/20/2025 |
| 2.2.5-preview-20210604-01 | 55 | 12/20/2025 |
| 2.2.5-preview-20210531-02 | 4 | 10/08/2026 |
| 2.2.4 | 40 | 12/14/2025 |
| 2.2.4-preview-20210513-02 | 3 | 10/08/2026 |
| 2.2.4-preview-20210331-02 | 45 | 12/20/2025 |
| 2.2.3 | 36 | 12/24/2025 |
| 2.2.2 | 35 | 12/17/2025 |
| 2.2.1 | 28 | 12/29/2025 |
| 2.2.0-preview-20210115-03 | 32 | 12/20/2025 |
| 2.2.0-preview-20201126-03 | 30 | 12/13/2025 |
| 2.1.2 | 40 | 12/19/2025 |
| 2.1.1 | 41 | 12/16/2025 |
| 2.1.0 | 37 | 12/29/2025 |
| 2.1.0-beta2 | 31 | 12/20/2025 |
| 2.1.0-beta | 47 | 12/13/2025 |
| 2.0.0 | 38 | 12/18/2025 |
| 2.0.0-beta4 | 34 | 12/20/2025 |
| 2.0.0-beta2 | 41 | 12/13/2025 |
| 1.4.0 | 41 | 12/29/2025 |
| 1.4.0-beta | 26 | 12/13/2025 |
| 1.3.2 | 41 | 12/25/2025 |
| 1.3.1 | 35 | 12/23/2025 |
| 1.3.0 | 47 | 12/29/2025 |
| 1.3.0-beta2 | 42 | 12/20/2025 |
| 1.2.1 | 29 | 12/29/2025 |
| 1.2.0 | 36 | 12/29/2025 |
| 1.2.0-beta3 | 4 | 09/30/2026 |
| 1.2.0-beta | 37 | 12/16/2025 |
| 1.1.18 | 34 | 12/20/2025 |
| 1.1.17 | 31 | 12/20/2025 |
| 1.1.14 | 43 | 12/13/2025 |
| 1.1.13 | 45 | 12/13/2025 |
| 1.1.11 | 31 | 12/12/2025 |
| 1.0.8-rc2 | 46 | 12/12/2025 |
| 1.0.8-rc | 50 | 12/13/2025 |
| 1.0.7-preview | 45 | 12/20/2025 |
| 1.0.6-preview | 41 | 12/28/2025 |
| 1.0.5-preview | 39 | 12/20/2025 |
| 1.0.4-preview | 32 | 12/17/2025 |
| 1.0.3-preview | 33 | 12/15/2025 |
| 1.0.1-preview | 24 | 12/20/2025 |
| 1.0.0-preview | 43 | 12/20/2025 |