Skip to content

Commit fc2ef0b

Browse files
Apply suggestions from code review
Co-authored-by: Genevieve Warren <[email protected]>
1 parent cb7a178 commit fc2ef0b

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

docs/core/testing/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The test platform is the engine that runs the tests and acts as a communication
4343

4444
VSTest has been used for many years in .NET and was the only test platform in the ecosystem. Early in 2024, the first stable version of a new test platform, called [Microsoft.Testing.Platform (MTP)](./microsoft-testing-platform-intro.md), was released. For more information about migrating from VSTest to Microsoft.Testing.Platform, see [Migration guide from VSTest to Microsoft.Testing.Platform](./migrating-vstest-microsoft-testing-platform.md).
4545

46-
The test platform also provides extensibility APIs so that additional features can be implemented and get them working for all test frameworks. There are usually built-in features built on top of the extensibility APIs, such as TRX reporting and hang and crash dumps. The community can also build their own extensions that end up working for all test frameworks.
46+
The test platform also provides extensibility APIs so that additional features can be implemented and made available for all test frameworks. There are usually built-in features built on top of the extensibility APIs, such as TRX reporting and hang and crash dumps. The community can also build custom extensions that work for all test frameworks.
4747

4848
### Test frameworks
4949

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ ms.author: ygerges
66
ms.date: 09/15/2025
77
---
88

9-
# Migration guide from VSTest to Microsoft.Testing.Platform
9+
# Migrate from VSTest to Microsoft.Testing.Platform
1010

11-
In this article, you'll learn how to migrate from VSTest to Microsoft.Testing.Platform.
11+
In this article, you learn how to migrate from VSTest to Microsoft.Testing.Platform.
1212

1313
## Opt-in to use Microsoft.Testing.Platform
1414

@@ -41,7 +41,7 @@ To opt-in, add `<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlat
4141

4242
### Opt-in for .NET 9 SDK and earlier
4343

44-
In .NET 9 SDK and earlier, there is no *native* support for Microsoft.Testing.Platform for `dotnet test`. However, we provide support that is built on top of VSTest infrastructure. To use that, add `<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>` under a `PropertyGroup` in [`Directory.Build.props`](/visualstudio/msbuild/customize-by-directory) file.
44+
In .NET 9 SDK and earlier, there is no *native* support for Microsoft.Testing.Platform for `dotnet test`. Support is built on top of the VSTest infrastructure. To use that, add `<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>` under a `PropertyGroup` in [`Directory.Build.props`](/visualstudio/msbuild/customize-by-directory) file.
4545

4646
> [!IMPORTANT]
4747
> When running Microsoft.Testing.Platform support in this mode, you need to add `--` to separate the `dotnet test` arguments from the new platform arguments. For example, `dotnet test --no-build -- --list-tests`.
@@ -63,9 +63,9 @@ Starting with .NET 10 SDK, there is *native* support for Microsoft.Testing.Platf
6363
6464
### Update `dotnet test` invocations
6565

66-
Command line options of `dotnet test` are divided into 2 categories: build related arguments and test related ones.
66+
Command line options of `dotnet test` are divided into two categories: build-related arguments and test-related ones.
6767

68-
The build related arguments are irrelevant to the test platform and as such don't need to be updated for the new platform. Build related arguments are listed below:
68+
The build-related arguments are irrelevant to the test platform and as such don't need to be updated for the new platform. Build-related arguments are listed here:
6969

7070
- `-a|--arch <ARCHITECTURE>`
7171
- `--artifacts-path <ARTIFACTS_DIR>`
@@ -81,7 +81,7 @@ The build related arguments are irrelevant to the test platform and as such don'
8181
- `-r|--runtime <RUNTIME_IDENTIFIER>`
8282
- `-v|--verbosity <LEVEL>`
8383

84-
The test related arguments are VSTest specific and so need to be transformed to match the new platform. The following table shows the mapping between the VSTest arguments and the new platform:
84+
The test-related arguments are VSTest specific and so need to be transformed to match the new platform. The following table shows the mapping between the VSTest arguments and the new platform:
8585

8686
| VSTest argument | New platform argument |
8787
|-----------------|-----------------------|
@@ -104,7 +104,7 @@ The test related arguments are VSTest specific and so need to be transformed to
104104

105105
#### `--collect`
106106

107-
`--collect` is a general extensibility point in VSTest for any data collector. The extensibility model of Microsoft.Testing.Platform is different and there is no such centralized argument to be used by all data collectors. With Microsoft.Testing.Platform, each data collector can add its own command-line option. For example, running Microsoft CodeCoverage through VSTest can be similar to the following:
107+
`--collect` is a general extensibility point in VSTest for any data collector. The extensibility model of Microsoft.Testing.Platform is different and there is no such centralized argument to be used by all data collectors. With Microsoft.Testing.Platform, each data collector can add its own command-line option. For example, running Microsoft CodeCoverage through VSTest might be similar to the following:
108108

109109
```dotnetcli
110110
dotnet test --collect "Code Coverage;Format=cobertura"
@@ -122,7 +122,7 @@ dotnet test --coverage --coverage-output-format cobertura
122122
123123
#### `--filter`
124124

125-
`--filter` is the VSTest-based filter. This is supported by MSTest and NUnit even when running with Microsoft.Testing.Platform. However, for xUnit.net, this is no longer supported when running with Microsoft.Testing.Platform. You must migrate from the VSTest-based filter to the new filter support in xunit.v3 which is provided using the following command-line options:
125+
`--filter` is the VSTest-based filter. This is supported by MSTest and NUnit even when running with Microsoft.Testing.Platform. However, for xUnit.net, this is no longer supported when running with Microsoft.Testing.Platform. You must migrate from the VSTest-based filter to the new filter support in xunit.v3, which is provided using the following command-line options:
126126

127127
- `--filter-class`
128128
- `--filter-not-class`
@@ -140,22 +140,22 @@ For more information, see [Microsoft.Testing.Platform documentation for xUnit.ne
140140

141141
What was usually referred to as "logger" in VSTest is referred to as "reporter" in Microsoft.Testing.Platform. In Microsoft.Testing.Platform, logging is explicitly for diagnosing purposes only.
142142

143-
Similar to `--collect`, `--logger` is a general extensibility point in VSTest for any logger (what we call reporter in the context of Microsoft.Testing.Platform). Each Microsoft.Testing.Platform reporter is free to add its own command-line option, and as such there is no centralized command-line option similar to VSTest's `--logger`.
143+
Similar to `--collect`, `--logger` is a general extensibility point in VSTest for any logger (or, in the context of Microsoft.Testing.Platform, any *reporter*). Each Microsoft.Testing.Platform reporter is free to add its own command-line option, and as such there is no centralized command-line option like VSTest's `--logger`.
144144

145-
One of the very commonly used VSTest loggers is the TRX logger. This was usually called as follows:
145+
One of the very commonly used VSTest loggers is the TRX logger. This logger is usually called as follows:
146146

147147
```dotnetcli
148148
dotnet test --logger trx
149149
```
150150

151-
With Microsoft.Testing.Platform, this becomes:
151+
With Microsoft.Testing.Platform, the command becomes:
152152

153153
```dotnetcli
154154
dotnet test --report-trx
155155
```
156156

157157
> [!IMPORTANT]
158-
> In order to use `--report-trx`, you must have `Microsoft.Testing.Extensions.TrxReport` NuGet package.
158+
> To use `--report-trx`, you must have the `Microsoft.Testing.Extensions.TrxReport` NuGet package installed.
159159
>
160160
> [!IMPORTANT]
161161
> As explained earlier, when using Microsoft.Testing.Platform with the VSTest-based `dotnet test`, extra `--` is needed before the arguments intended to be passed to the platform.
@@ -191,8 +191,8 @@ If you're using the [VSTest task](/azure/devops/pipelines/tasks/reference/vstest
191191

192192
### .NET Core CLI task
193193

194-
1. If you have custom `arguments` passed to the task, this needs to follow the same guidance as the `dotnet test` migration guidance.
195-
1. If you're using the [DotNetCoreCLI](/azure/devops/pipelines/tasks/reference/dotnet-core-cli-v2) task without opting-in the native Microsoft.Testing.Platform experience for .NET 10 SDK and later via `global.json` file, you need to set the task `arguments` to correctly point to the results directory it used to point to, as well as requested TRX report. For example:
194+
- If you have custom `arguments` passed to the task, follow the same guidance for `dotnet test` migration.
195+
- If you're using the [DotNetCoreCLI](/azure/devops/pipelines/tasks/reference/dotnet-core-cli-v2) task without opting-in to the native Microsoft.Testing.Platform experience for .NET 10 SDK and later via `global.json` file, you need to set the task `arguments` to correctly point to the results directory it used to point to, as well as the requested TRX report. For example:
196196

197197
```yml
198198
- task: DotNetCoreCLI@2

docs/navigate/devops-testing/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ items:
237237
href: ../../core/testing/microsoft-testing-platform-faq.md
238238
- name: Comparison with VSTest
239239
href: ../../core/testing/microsoft-testing-platform-vs-vstest.md
240-
- name: Migration guide from VSTest to Microsoft.Testing.Platform
240+
- name: Migrate from VSTest to Microsoft.Testing.Platform
241241
href: ../../core/testing/migrating-vstest-microsoft-testing-platform.md
242242
- name: Configure the test platform
243243
href: ../../core/testing/microsoft-testing-platform-config.md

0 commit comments

Comments
 (0)