Skip to content

Improve test platforms docs#51854

Merged
Evangelink merged 21 commits intomainfrom
dev/amauryleve/mtp-docs
Mar 2, 2026
Merged

Improve test platforms docs#51854
Evangelink merged 21 commits intomainfrom
dev/amauryleve/mtp-docs

Conversation

@Evangelink
Copy link
Member

@Evangelink Evangelink commented Feb 24, 2026

Summary

Explain what are test platforms and how to choose the one to use. Add links to the test frameworks, because that's what people know and will use.

Also refactor MTP doc so that it's easier to browse and look for the info.


Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
docs/core/project-sdk/msbuild-props.md MSBuild reference for .NET SDK projects
docs/core/testing/index.md Testing in .NET
docs/core/testing/microsoft-testing-platform-architecture-capabilities.md Microsoft.Testing.Platform capabilities
docs/core/testing/microsoft-testing-platform-architecture-extensions.md Build extensions
docs/core/testing/microsoft-testing-platform-architecture-services.md docs/core/testing/microsoft-testing-platform-architecture-services
docs/core/testing/microsoft-testing-platform-architecture-test-framework.md Build a test framework
docs/core/testing/microsoft-testing-platform-architecture.md Create custom extensions for Microsoft.Testing.Platform
docs/core/testing/microsoft-testing-platform-cli-options.md Microsoft.Testing.Platform CLI options reference
docs/core/testing/microsoft-testing-platform-code-coverage.md docs/core/testing/microsoft-testing-platform-code-coverage
docs/core/testing/microsoft-testing-platform-crash-hang-dumps.md Crash and hang dumps
docs/core/testing/microsoft-testing-platform-extensions-vstest-bridge.md Microsoft.Testing.Platform VSTest bridge extension
docs/core/testing/microsoft-testing-platform-fakes.md Microsoft Fakes
docs/core/testing/microsoft-testing-platform-features.md docs/core/testing/microsoft-testing-platform-features
docs/core/testing/microsoft-testing-platform-hot-reload.md Hot Reload
docs/core/testing/microsoft-testing-platform-intro.md Microsoft.Testing.Platform overview
docs/core/testing/microsoft-testing-platform-open-telemetry.md OpenTelemetry
docs/core/testing/microsoft-testing-platform-retry.md docs/core/testing/microsoft-testing-platform-retry
docs/core/testing/microsoft-testing-platform-run-and-debug.md Run and debug tests
docs/core/testing/microsoft-testing-platform-telemetry.md Microsoft.Testing.Platform telemetry
docs/core/testing/microsoft-testing-platform-terminal-output.md Terminal output
docs/core/testing/microsoft-testing-platform-test-reports.md docs/core/testing/microsoft-testing-platform-test-reports
docs/core/testing/microsoft-testing-platform-troubleshooting.md Microsoft.Testing.Platform troubleshooting
docs/core/testing/migrating-vstest-microsoft-testing-platform.md Migration guide from VSTest to Microsoft.Testing.Platform
docs/core/testing/test-platforms-overview.md Test platforms overview for .NET
docs/core/testing/unit-testing-mstest-running-tests.md docs/core/testing/unit-testing-mstest-running-tests
docs/core/testing/unit-testing-mstest-sdk.md MSTest SDK configuration
docs/core/testing/unit-testing-nunit-runner-intro.md Microsoft.Testing.Platform support in NUnit (NUnit runner)
docs/core/tools/dotnet-test-mtp.md dotnet test command with Microsoft.Testing.Platform
docs/navigate/devops-testing/index.yml docs/navigate/devops-testing/index
docs/navigate/devops-testing/toc.yml docs/navigate/devops-testing/toc

@Evangelink Evangelink marked this pull request as ready for review February 26, 2026 21:13
@Evangelink Evangelink requested review from a team, gewarren and meaghanlewis as code owners February 26, 2026 21:13
Copilot AI review requested due to automatic review settings February 26, 2026 21:13
@Evangelink Evangelink enabled auto-merge (squash) February 26, 2026 21:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Microsoft.Testing.Platform (MTP) documentation to improve navigation and organization. It shifts from an extension-centric structure to a feature-centric structure, making it easier for users to find the information they need based on their goals rather than navigating through generic "extensions" categories.

Changes:

  • Adds new test platforms overview page to help users choose between VSTest and MTP
  • Reorganizes MTP documentation from extension categories to feature-specific pages (terminal output, test reports, code coverage, crash/hang dumps, retry, hot reload, fakes, OpenTelemetry, telemetry)
  • Creates consolidated CLI options reference page
  • Merges exit codes and FAQ content into unified troubleshooting page
  • Splits architecture documentation into separate pages for test frameworks vs extensions
  • Updates TOC for better navigation hierarchy
  • Establishes comprehensive redirects for all renamed/deleted pages

Reviewed changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docs/core/testing/test-platforms-overview.md New overview page to help users choose between VSTest and MTP platforms
docs/core/testing/microsoft-testing-platform-features.md New feature overview page replacing generic extensions page
docs/core/testing/microsoft-testing-platform-cli-options.md New consolidated CLI reference replacing scattered option documentation
docs/core/testing/microsoft-testing-platform-troubleshooting.md New troubleshooting page consolidating exit codes and FAQ
docs/core/testing/microsoft-testing-platform-terminal-output.md Feature-specific page extracted from extensions-output.md
docs/core/testing/microsoft-testing-platform-test-reports.md Feature-specific page extracted from extensions-test-reports.md
docs/core/testing/microsoft-testing-platform-code-coverage.md Feature-specific page extracted from extensions-code-coverage.md
docs/core/testing/microsoft-testing-platform-crash-hang-dumps.md Feature-specific page extracted from extensions-diagnostics.md
docs/core/testing/microsoft-testing-platform-retry.md Feature-specific page extracted from extensions-policy.md
docs/core/testing/microsoft-testing-platform-hot-reload.md Feature-specific page extracted from extensions-hosting.md
docs/core/testing/microsoft-testing-platform-fakes.md Feature-specific page from extensions-fakes.md
docs/core/testing/microsoft-testing-platform-open-telemetry.md New OpenTelemetry feature page
docs/core/testing/microsoft-testing-platform-telemetry.md Updated telemetry page with auto-registration info
docs/core/testing/microsoft-testing-platform-run-and-debug.md Extracted run/debug content from intro page
docs/core/testing/microsoft-testing-platform-architecture-test-framework.md Separated test framework architecture from extensions
docs/core/testing/microsoft-testing-platform-architecture-extensions.md Refocused on extensions architecture only
docs/core/testing/microsoft-testing-platform-intro.md Streamlined overview with navigation to other pages
docs/core/testing/migrating-vstest-microsoft-testing-platform.md Updated links and fixed missing quote
docs/navigate/devops-testing/toc.yml Reorganized TOC structure to match new organization
.openpublishing.redirection.core.json Added comprehensive redirects for all moved/renamed pages
Various other files Updated internal links to point to renamed pages

Copy link
Contributor

@meaghanlewis meaghanlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes LGTM. Left a handful of suggestions for you to consider.

Evangelink and others added 6 commits March 1, 2026 11:15
Co-authored-by: Meaghan Osagie (Lewis) <mosagie@microsoft.com>
Co-authored-by: Meaghan Osagie (Lewis) <mosagie@microsoft.com>
Co-authored-by: Meaghan Osagie (Lewis) <mosagie@microsoft.com>
Co-authored-by: Meaghan Osagie (Lewis) <mosagie@microsoft.com>
Co-authored-by: Meaghan Osagie (Lewis) <mosagie@microsoft.com>
…-bridge.md

Co-authored-by: Meaghan Osagie (Lewis) <mosagie@microsoft.com>
Evangelink and others added 2 commits March 1, 2026 11:17
@Evangelink Evangelink merged commit e189aa8 into main Mar 2, 2026
11 checks passed
@Evangelink Evangelink deleted the dev/amauryleve/mtp-docs branch March 2, 2026 12:30

## How to choose your platform

Use the following scenarios to choose quickly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have also packaged WinUI and UWP, which don't work under MTP today.

| Use case | Choose | Why |
|---|---|---|
| You need Native AOT or trimming test execution scenarios. | Microsoft.Testing.Platform | MTP supports these modern deployment scenarios, while VSTest doesn't. |
| You need to mix .NET tests and non-.NET test adapters (for example JavaScript or C++ adapters). | VSTest | VSTest supports mixed-language adapter scenarios, while MTP is .NET-specific. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still possible to do that mix if you know what you're doing.

For example, I can have my global.json set to MTP, run all .NET tests with dotnet test normally. And then use vstest.console for C++ or JS

| You need Native AOT or trimming test execution scenarios. | Microsoft.Testing.Platform | MTP supports these modern deployment scenarios, while VSTest doesn't. |
| You need to mix .NET tests and non-.NET test adapters (for example JavaScript or C++ adapters). | VSTest | VSTest supports mixed-language adapter scenarios, while MTP is .NET-specific. |
| You want test projects to behave like regular executables (`dotnet run`, direct executable run, `dotnet watch`, and startup-project F5 flows). | Microsoft.Testing.Platform | MTP is executable-first, so test apps run like standard .NET apps in local and CI workflows. |
| You rely on long-established integrations across Microsoft and non-Microsoft tooling. | VSTest | VSTest has the longest compatibility track record across existing products, tasks, and pipelines. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of non-MS tooling is having MTP support, or at least there are ongoing efforts on that space. I'm not sure if we should be mentioning this.

| You prioritize reproducibility and tighter control of extension loading across machines. | Microsoft.Testing.Platform | MTP favors explicit, build-time extension registration, which reduces machine-dependent behavior from dynamically discovered components and can simplify security review. |
| You need a minimal core with optional features that you can disable per environment. | Microsoft.Testing.Platform | MTP uses a lightweight core with opt-in extensions. If an extension introduces unsupported dependencies or version conflicts in a specific environment, you can remove or disable that extension. |
| You prefer strict defaults and explicit behavior. | Microsoft.Testing.Platform | MTP favors deterministic execution with explicit checks. For example, it can fail when no tests run, reduce environment-dependent variability, and avoid implicit discovery and execution heuristics. |
| You prefer softer, broad backward-compatible defaults. | VSTest | VSTest prioritizes compatibility-oriented defaults for diverse, existing toolchains. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might give wrong impression that we don't care about backcompat for MTP.

|---|---|---|
| IDE integration | Mature integration across Visual Studio and other tools that depend on VSTest protocol and adapters. | Supported in Visual Studio and Visual Studio Code scenarios, with ongoing integration work in parts of the ecosystem. |
| CI and external tools | Broad support across long-established Microsoft and non-Microsoft tools and tasks. In Azure DevOps, you can use either the VSTest task (`VSTest@3`, `vstest.console`) or the .NET task (`DotNetCoreCLI@2`, `dotnet test`). | Works in CI and modern .NET workflows, but some third-party integrations might still lag behind VSTest. In Azure DevOps, use the .NET task (`DotNetCoreCLI@2`, `dotnet test`). |
| `dotnet test` behavior | Default VSTest mode. VSTest arguments and behavior apply. | Native MTP mode is available in .NET 10 SDK and later. Before .NET 10 SDK, MTP ran through VSTest mode with limitations (`TestingPlatformDotnetTestSupport`, plus the extra `--` argument separator). |
Copy link
Member

@Youssef1313 Youssef1313 Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't care about mentioning TestingPlatformDotnetTestSupport and older SDKs. It's going to die anyway.

---

# Microsoft.Testing.Platform extensibility
# Build extensions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep the header mentioning the product name. For example, Build extensions for Microsoft.Testing.Platform.

`CancelledTestNodeStateProperty` informs the testing platform that this `TestNode` has failed due to cancellation.
For the full extension point summary and in-process/out-of-process concepts, see [Create custom extensions](./microsoft-testing-platform-architecture.md).

## Other extensibility points
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very weird the first H2 is "Other extensibility points". I would say ## Extensibility points and it's already clear that ITestFramework isn't covered by this article.


For the full extension point summary and in-process/out-of-process concepts, see [Create custom extensions](./microsoft-testing-platform-architecture.md).

If you're migrating an existing VSTest-based test framework to Microsoft.Testing.Platform, use the [VSTest Bridge](./microsoft-testing-platform-extensions-vstest-bridge.md) extension to simplify the transition.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should encourage being fully MTP rather than going the bridge way.

public sealed class CreateTestSessionContext : TestSessionContext
{
public SessionUid SessionUid { get; }
public ClientInfo Client { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer correct.

Comment on lines +121 to +125
public sealed class ClientInfo
{
public string Id { get; }
public string Version { get; }
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed

```

The `SessionUid` serves as the unique identifier for the current test session, providing a logical connection to the session's results.
The `ClientInfo` provides details about the entity invoking the test framework. This information can be utilized by the test framework to modify its behavior. For example, as of the time this document was written, a console execution would report a client name such as "testingplatform-console".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed as well.

The return object is a `CloseTestSessionResult`:

```csharp
public sealed class CreateTestSessionResult
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo? It should be CloseTestSessionResult

public class TestSessionContext
{
public SessionUid SessionUid { get; }
public ClientInfo Client { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outdated?

Comment on lines +232 to +233
// This is experimental and intended for future use, please disregard for now.
public ITestExecutionFilter Filter { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's no longer marked as experimental

Comment on lines +267 to +268
// This is experimental and intended for future use, please disregard for now.
public ITestExecutionFilter Filter { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

public PropertyBag Properties { get; init; } = new();
}

public sealed class TestNodeUid(string value)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon

Comment on lines +502 to +505
`TestMethodIdentifierProperty` is a unique identifier for a test method, adhering to the ECMA-335 standard.

> [!NOTE]
> The data needed to create this property can be conveniently obtained using the .NET reflection feature, using types from the `System.Reflection` namespace.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is nothing well defined in that space. And I don't think reflection is following ECMA-335

# VSTest Bridge extension

This extension provides a compatibility layer with VSTest allowing the test frameworks depending on it to continue supporting running in VSTest mode (`vstest.console.exe`, usual `dotnet test`, `VSTest task` on AzDo, Test Explorers of Visual Studio and Visual Studio Code...). This extension is shipped as part of [Microsoft.Testing.Extensions.VSTestBridge](https://www.nuget.org/packages/Microsoft.Testing.Extensions.VSTestBridge) package.
This extension provides a compatibility layer with VSTest allowing the test frameworks depending on it to continue supporting running in VSTest mode (`vstest.console.exe`, `dotnet test`, `VSTest task` on Azure DevOps, Test Explorers of Visual Studio and Visual Studio Code). This extension is shipped as part of [Microsoft.Testing.Extensions.VSTestBridge](https://nuget.org/packages/Microsoft.Testing.Extensions.VSTestBridge) NuGet package.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we have dotnet test supporting both MTP and VSTEst, and also TE supporting both, I think it's confusing and might be understood as MTP doesn't support those. IMO the following is much more clear.

Suggested change
This extension provides a compatibility layer with VSTest allowing the test frameworks depending on it to continue supporting running in VSTest mode (`vstest.console.exe`, `dotnet test`, `VSTest task` on Azure DevOps, Test Explorers of Visual Studio and Visual Studio Code). This extension is shipped as part of [Microsoft.Testing.Extensions.VSTestBridge](https://nuget.org/packages/Microsoft.Testing.Extensions.VSTestBridge) NuGet package.
This extension provides a compatibility layer with VSTest allowing test frameworks that are already implemented with VSTest to:
1. run easily with Microsoft.Testing.Platform without a major rewrite.
2. support both VSTest and Microsoft.Testing.Platform with the same test framework implementation.
This extension is shipped as part of [Microsoft.Testing.Extensions.VSTestBridge](https://nuget.org/packages/Microsoft.Testing.Extensions.VSTestBridge) NuGet package.

---
title: Microsoft.Testing.Platform Fakes extension
description: Learn about the various Microsoft.Testing.Platform Fakes extension capabilities and how to use it.
title: Microsoft.Testing.Platform Microsoft Fakes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Microsoft Fakes support for Microsoft.Testing.Platform is more clear IMO

- Need hot reload support: [Hot Reload](./microsoft-testing-platform-hot-reload.md) (extension)
- Need Microsoft Fakes support: [Microsoft Fakes](./microsoft-testing-platform-fakes.md) (extension)
- Need OpenTelemetry traces and metrics: [OpenTelemetry](./microsoft-testing-platform-open-telemetry.md) (extension)
- Need telemetry opt-out information: [Telemetry](./microsoft-testing-platform-telemetry.md) (extension)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having hard time understanding what you mean by "Need telemetry opt-out information"


```csharp
var builder = await TestApplication.CreateBuilderAsync(args);
builder.TestHost.AddRetryProvider();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
builder.TestHost.AddRetryProvider();
builder.AddRetryProvider();


```csharp
var builder = await TestApplication.CreateBuilderAsync(args);
builder.AddTrxReportProvider();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be noted that with manual registration, it's best to register it last, until we implement a better way that doesn't depend on registration order.

| Option | Description |
|---|---|
| `--report-trx` | Generates the TRX report. |
| `--report-trx-filename` | The name of the generated TRX report. The default name matches the following format `<UserName>_<MachineName>_<yyyy-MM-dd HH:mm:ss>.trx`. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ss.fffffff not ss. We try to get high precision datetime to avoid conflicts when using the default file name.

| Option | Description |
|---|---|
| `--report-trx` | Generates the TRX report. |
| `--report-trx-filename` | The name of the generated TRX report. The default name matches the following format `<UserName>_<MachineName>_<yyyy-MM-dd HH:mm:ss>.trx`. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file name doesn't contain spaces or colons. That space and the colons are underscores.

| `3` | The exit code `3` indicates that the test session was aborted. A session can be aborted using <kbd>Ctrl</kbd>+<kbd>C</kbd>, as an example. |
| `4` | The exit code `4` indicates that the setup of used extensions is invalid and the tests session cannot run. |
| `5` | The exit code `5` indicates that the command line arguments passed to the test app are invalid. |
| `6` | The exit code `6` indicates that the test session is using a non-implemented feature. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants