Skip to content

Commit 50b2804

Browse files
Add a new doc page for MTP with v2 (#8)
Co-authored-by: Brad Wilson <dotnetguy@gmail.com>
1 parent 2c5ed84 commit 50b2804

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "Microsoft Testing Platform (xUnit.net v2)"
3+
title-version: 2025 December 30
4+
---
5+
6+
Support for running xUnit.net v2 tests via [Microsoft Testing Platform](https://learn.microsoft.com/dotnet/core/testing/unit-testing-platform-intro) is available via a third party NuGet package (`YTest.MTP.XUnit2`).
7+
8+
* [NuGet Package](https://www.nuget.org/packages/YTest.MTP.XUnit2)
9+
* [GitHub](https://github.com/Youssef1313/YTest.MTP.XUnit2)
10+
11+
Note that this project is not officially supported by xUnit.net or Microsoft. Any issues using this package should be reported to the GitHub project linked above.
12+
13+
See the [README](https://github.com/Youssef1313/YTest.MTP.XUnit2/blob/main/README.md) for the current feature set list as well as installation instructions.
14+
15+
## What is Microsoft Testing Platform?
16+
17+
VSTest has been the underlying driver behind `dotnet test` and Test Explorer (and `vstest.console` and Test View before them) since it first launched in Visual Studio 2010. The new Microsoft Testing Platform aims to replace those with a new engine that is modernized, streamlined, performs better, and offers much greater extensibility for test framework authors.
18+
19+
Test projects for Microsoft Testing Platform are standalone executables. When a Microsoft Testing Platform test project is compiled, it can then be run directly (typically by invoking the already built executable, or using `dotnet run` to both build and run). This allows for a streamlined experience where the produced executable is all that's needed to run the tests.
20+
21+
When using the `YTest.MTP.XUnit2` package, running your executable will run your tests in Microsoft Testing Platform mode:
22+
23+
```shell
24+
$ dotnet run
25+
YTest.MTP.XUnit2 Runner version 1.0.1+f1554021e38b5be2d84515eb7da51a6e5ed0c8cb (64-bit .NET 8.0.22)
26+
27+
Test run summary: Passed! - path/to/test-project.dll (net8.0|x64)
28+
total: 1
29+
failed: 0
30+
succeeded: 1
31+
skipped: 0
32+
duration: 56ms
33+
```
34+
35+
(Make sure you've added `<OutputType>Exe</OutputType>` to your project properties if you want to run your test project directly.)
36+
37+
Now your test project can run anywhere that Microsoft Testing Platform is supported. This includes `dotnet test` (in MTP mode), Test Explorer, JetBrains Rider, and more!
38+
39+
If you no longer need VSTest support after adding MTP support, you can safely remove the package references to `xunit.runner.visualstudio` and `Microsoft.NET.Test.Sdk`.

site/docs/getting-started/v3/microsoft-testing-platform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Microsoft Testing Platform"
2+
title: "Microsoft Testing Platform (xUnit.net v3)"
33
title-version: 2025 November 2
44
---
55

site/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: Home
88

99
xUnit.net is a free, open source, community-focused unit testing tool for C#, F#, and Visual Basic. xUnit.net v3 supports .NET 8.0 or later, and .NET Framework 4.7.2 or later.
1010

11-
xUnit.net works with the [.NET SDK](https://dotnet.microsoft.com/download) command line tools, [Visual Studio](https://visualstudio.microsoft.com/), [Visual Studio Code](https://code.visualstudio.com/), [JetBrains Rider](https://www.jetbrains.com/rider/), [NCrunch](https://www.ncrunch.net/), and any development environment compatible with [Microsoft Testing Platform](https://learn.microsoft.com/dotnet/core/testing/microsoft-testing-platform-intro) or [VSTest](https://github.com/microsoft/vstest).
11+
xUnit.net works with the [.NET SDK](https://dotnet.microsoft.com/download) command line tools, [Visual Studio](https://visualstudio.microsoft.com/), [Visual Studio Code](https://code.visualstudio.com/), [JetBrains Rider](https://www.jetbrains.com/rider/), [NCrunch](https://www.ncrunch.net/), and any development environment compatible with [Microsoft.Testing.Platform](https://learn.microsoft.com/dotnet/core/testing/microsoft-testing-platform-intro) or [VSTest](https://github.com/microsoft/vstest).
1212

1313
xUnit.net is part of the [.NET Foundation](https://www.dotnetfoundation.org/) and operates under their [code of conduct](https://www.dotnetfoundation.org/code-of-conduct). It is licensed under [Apache 2](https://opensource.org/licenses/Apache-2.0) (an OSI approved license). The project is [governed](/governance) by a Project Lead.
1414

site/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
href: /docs/getting-started/v2/getting-started
3636
- name: Migrating Unit Tests
3737
href: /docs/getting-started/v2/migration
38+
- name: Microsoft Testing Platform (MTP)
39+
href: /docs/getting-started/v2/microsoft-testing-platform
3840
- name: NuGet Packages
3941
href: /docs/nuget-packages-v2
4042
- name: Sample Projects

0 commit comments

Comments
 (0)