Skip to content

Commit 1dc95b5

Browse files
Replace MSTest Runner with Microsoft Testing Platform (#45099)
* Replace MSTest Runner with Microsoft Testing Platform * merge * Update msbuild-props * Update docs * Undo some changes * Update docs/core/testing/unit-testing-mstest-sdk.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/testing/unit-testing-mstest-sdk.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/testing/unit-testing-mstest-sdk.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/testing/unit-testing-mstest-sdk.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/testing/unit-testing-mstest-sdk.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/testing/unit-testing-mstest-sdk.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/testing/unit-testing-platform-vs-vstest.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/testing/unit-testing-mstest-runner-intro.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/testing/unit-testing-mstest-runner-intro.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/testing/unit-testing-mstest-runner-intro.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/testing/unit-testing-mstest-runner-intro.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/testing/unit-testing-mstest-runner-intro.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/project-sdk/msbuild-props.md Co-authored-by: Youssef Victor <[email protected]> * Update docs/core/project-sdk/msbuild-props.md Co-authored-by: Youssef Victor <[email protected]> * Use Microsoft.Testing.Platform in mstest runner intro * Update link * Remove MTP from fsharp and vb * Fix links --------- Co-authored-by: Youssef Victor <[email protected]>
1 parent bd2699b commit 1dc95b5

7 files changed

+19
-19
lines changed

docs/core/project-sdk/msbuild-props.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,11 +1556,11 @@ When you use the [MSTest project SDK](../testing/unit-testing-mstest-sdk.md), th
15561556
| `None` | No extensions are enabled. |
15571557
| `AllMicrosoft` | Enable all extensions shipped by Microsoft (including extensions with a restrictive license). |
15581558

1559-
For more information, see [MSTest runner profile](../testing/unit-testing-mstest-sdk.md#mstest-runner-profile).
1559+
For more information, see [Microsoft.Testing.Platform profile](../testing/unit-testing-mstest-sdk.md#microsofttestingplatform-profile).
15601560

15611561
### UseVSTest
15621562

1563-
Set the `UseVSTest` property to `true` to switch from the MSTest runner to the [VSTest](/visualstudio/test/vstest-console-options) runner when using the [MSTest project SDK](../testing/unit-testing-mstest-sdk.md).
1563+
Set the `UseVSTest` property to `true` to switch from Microsoft.Testing.Platform to the [VSTest](/visualstudio/test/vstest-console-options) runner when using the [MSTest project SDK](../testing/unit-testing-mstest-sdk.md).
15641564

15651565
### MSTestAnalysisMode
15661566

docs/core/testing/microsoft-testing-platform-vs-vstest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.date: 12/15/2023
88

99
# Microsoft.Testing.Platform and VSTest comparison
1010

11-
`Microsoft.Testing.Platform` is a lightweight and portable alternative to [VSTest](https://github.com/microsoft/vstest) for running tests in command line, in continuous integration (CI) pipelines, in Visual Studio Test Explorer, and in Visual Studio Code. In this article, you learn the key differences between the MSTest runner and VSTest.
11+
`Microsoft.Testing.Platform` is a lightweight and portable alternative to [VSTest](https://github.com/microsoft/vstest) for running tests in command line, in continuous integration (CI) pipelines, in Visual Studio Test Explorer, and in Visual Studio Code. In this article, you learn the key differences between Microsoft.Testing.Platform and VSTest.
1212

1313
## Differences in test execution
1414

docs/core/testing/unit-testing-fsharp-with-mstest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Make the *MathService.Tests* directory the current directory and create a new pr
5656
</ItemGroup>
5757
```
5858

59-
The test project requires other packages to create and run unit tests. `dotnet new` in the previous step added MSTest and the MSTest runner. Now, add the `MathService` class library as another dependency to the project. Use the `dotnet add reference` command:
59+
The test project requires other packages to create and run unit tests. `dotnet new` in the previous step added MSTest. Now, add the `MathService` class library as another dependency to the project. Use the `dotnet add reference` command:
6060

6161
```dotnetcli
6262
dotnet add reference ../MathService/MathService.fsproj

docs/core/testing/unit-testing-mstest-runner-intro.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ MSTest supports running tests with both VSTest and [Microsoft.Testing.Platform (
1212

1313
The MSTest runner is open source and builds on the [`Microsoft.Testing.Platform`](./microsoft-testing-platform-intro.md) library. You can find `Microsoft.Testing.Platform` code in the [microsoft/testfx](https://github.com/microsoft/testfx/tree/main/src/Platform/Microsoft.Testing.Platform) GitHub repository. The MSTest runner comes bundled with `MSTest in 3.2.0` or newer.
1414

15-
## Enable MSTest runner in an MSTest project
15+
## Enable Microsoft.Testing.Platform in an MSTest project
1616

17-
It's recommended to use [MSTest SDK](./unit-testing-mstest-sdk.md) as it greatly simplifies your project configuration and updating the project, and it ensures a proper alignment of the versions of the platform (MSTest runner) and its extensions.
17+
It's recommended to use [MSTest SDK](./unit-testing-mstest-sdk.md) as it greatly simplifies your project configuration and updating the project, and it ensures a proper alignment of the versions of the platform (Microsoft.Testing.Platform) and its extensions.
1818

19-
When you use `MSTest SDK`, by default you're opted in to using MSTest runner.
19+
When you use `MSTest SDK`, by default you're opted in to using Microsoft.Testing.Platform.
2020

2121
```xml
2222
<Project Sdk="MSTest.Sdk/3.8.2">
@@ -38,7 +38,7 @@ Consider the following example project file:
3838
<Project Sdk="Microsoft.NET.Sdk">
3939

4040
<PropertyGroup>
41-
<!-- Enable the MSTest runner, this is an opt-in feature -->
41+
<!-- Enable Microsoft.Testing.Platform, this is an opt-in feature -->
4242
<EnableMSTestRunner>true</EnableMSTestRunner>
4343
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
4444

@@ -70,7 +70,7 @@ Consider the following example project file:
7070
<PackageReference Include="MSTest" Version="3.8.0" />
7171

7272
<!--
73-
Coverlet collector isn't compatible with MSTest runner, you can
73+
Coverlet collector isn't compatible with Microsoft.Testing.Platform, you can
7474
either switch to Microsoft CodeCoverage (as shown below),
7575
or switch to be using coverlet global tool
7676
https://github.com/coverlet-coverage/coverlet#net-global-tool-guide-suffers-from-possible-known-issue
@@ -89,7 +89,7 @@ Consider the following example project file:
8989

9090
### .runsettings
9191

92-
The MSTest runner supports the [runsettings](microsoft-testing-platform-extensions-vstest-bridge.md#runsettings-support) through the command-line option `--settings`. For the full list of supported MSTest entries, see [Configure MSTest: Runsettings](./unit-testing-mstest-configure.md#runsettings). The following commands show various usage examples.
92+
Microsoft.Testing.Platform supports the [runsettings](microsoft-testing-platform-extensions-vstest-bridge.md#runsettings-support) through the command-line option `--settings`. For the full list of supported MSTest entries, see [Configure MSTest: Runsettings](./unit-testing-mstest-configure.md#runsettings). The following commands show various usage examples.
9393

9494
Using `dotnet run`:
9595

docs/core/testing/unit-testing-mstest-sdk.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,16 @@ You don't need anything else to build and run your tests and you can use the sam
6868
6969
## Select the runner
7070

71-
By default, MSTest SDK relies on [MSTest runner](./unit-testing-mstest-runner-intro.md), but you can switch to [VSTest](/visualstudio/test/vstest-console-options) by adding the property `<UseVSTest>true</UseVSTest>`.
71+
By default, MSTest SDK relies on [Microsoft.Testing.Platform](./unit-testing-mstest-runner-intro.md), but you can switch to [VSTest](/visualstudio/test/vstest-console-options) by adding the property `<UseVSTest>true</UseVSTest>`.
7272

73-
## Extend MSTest runner
73+
## Extend Microsoft.Testing.Platform
7474

75-
You can customize `MSTest runner` experience through a set of [NuGet package extensions](./microsoft-testing-platform-extensions.md). To simplify and improve this experience, MSTest SDK introduces two features:
75+
You can customize `Microsoft.Testing.Platform` experience through a set of [NuGet package extensions](./microsoft-testing-platform-extensions.md). To simplify and improve this experience, MSTest SDK introduces two features:
7676

77-
- [MSTest runner profile](#mstest-runner-profile)
77+
- [Microsoft.Testing.Platform profile](#microsofttestingplatform-profile)
7878
- [Enable or disable extensions](#enable-or-disable-extensions)
7979

80-
### MSTest runner profile
80+
### Microsoft.Testing.Platform profile
8181

8282
The concept of *profiles* allows you to select the default set of configurations and extensions that will be applied to your test project.
8383

@@ -275,7 +275,7 @@ Finally, based on the extensions profile you're using, you can also remove some
275275

276276
### Update your CI
277277

278-
Once you've updated your projects, if you're using `MSTest runner` (default) and if you rely on `dotnet test` to run your tests, you must update your CI configuration. For more information and to guide your understanding of all the required changes, see [dotnet test integration](./microsoft-testing-platform-integration-dotnet-test.md#dotnet-test---microsofttestingplatform-mode).
278+
Once you've updated your projects, if you're using `Microsoft.Testing.Platform` (default) and if you rely on `dotnet test` to run your tests, you must update your CI configuration. For more information and to guide your understanding of all the required changes, see [dotnet test integration](./microsoft-testing-platform-integration-dotnet-test.md#dotnet-test---microsofttestingplatform-mode).
279279

280280
Here's an example update when using the `DotNetCoreCLI` task in Azure DevOps:
281281

docs/core/testing/unit-testing-visual-basic-with-mstest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Make the *PrimeService.Tests* directory the current directory and create a new p
6161
</ItemGroup>
6262
```
6363

64-
The test project requires other packages to create and run unit tests. `dotnet new` in the previous step added MSTest and the MSTest runner. Now, add the `PrimeService` class library as another dependency to the project. Use the [`dotnet add reference`](../tools/dotnet-add-reference.md) command:
64+
The test project requires other packages to create and run unit tests. `dotnet new` in the previous step added MSTest. Now, add the `PrimeService` class library as another dependency to the project. Use the [`dotnet add reference`](../tools/dotnet-add-reference.md) command:
6565

6666
```dotnetcli
6767
dotnet add reference ../PrimeService/PrimeService.vbproj

docs/core/tools/dotnet-new-sdk-templates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ The ability to create a project for an earlier TFM depends on having that versio
158158
The runner/platform for the test project. The possible values are:
159159

160160
- `VSTest` - VSTest platform (Default).
161-
- `MSTest` - MSTest Runner (i.e. Microsoft.Testing.Platform).
161+
- `MSTest` - Microsoft.Testing.Platform.
162162

163163
- **`--coverage-tool <COVERAGE_TOOL>`**
164164

@@ -169,7 +169,7 @@ The ability to create a project for an earlier TFM depends on having that versio
169169

170170
- **`--extensions-profile <EXTENSIONS_PROFILE>`**
171171

172-
The SDK extensions profile when using MSTest Runner. The possible values are:
172+
The SDK extensions profile when using Microsoft.Testing.Platform. The possible values are:
173173

174174
- `Default` - Default extensions profile (Default).
175175
- `None` - No extensions are enabled.

0 commit comments

Comments
 (0)