From 1ead13c10e94cbc030800ad35bd0c586aa45c82a Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 2 Dec 2025 13:02:49 +0100 Subject: [PATCH 1/4] Improve MTP overview doc --- .../microsoft-testing-platform-intro.md | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/docs/core/testing/microsoft-testing-platform-intro.md b/docs/core/testing/microsoft-testing-platform-intro.md index 21f5e558f600a..3cb702d0cc8e0 100644 --- a/docs/core/testing/microsoft-testing-platform-intro.md +++ b/docs/core/testing/microsoft-testing-platform-intro.md @@ -175,16 +175,35 @@ To run a test, navigate to **Test Explorer**, select the test (or tests) to run. ### [Continuous integration (CI)](#tab/continuous-integration) -There's no special pipeline task, or any extra tooling to run `Testing.Platform` tests. There's also no other tooling required to run multiple tests projects through a single command. +- To run a single test project in CI, add one step for each test executable that you wish to run, such as this on Azure DevOps: -To run a test project in CI add one step for each test executable that you wish to run, such as this on Azure DevOps: + ```yml + - task: CmdLine@2 + displayName: "Run Contoso.MyTests" + inputs: + script: '.\Contoso.MyTests\bin\Debug\net8.0\Contoso.MyTests.exe' + ``` -```yml -- task: CmdLine@2 - displayName: "Run Contoso.MyTests" - inputs: - script: '.\Contoso.MyTests\bin\Debug\net8.0\Contoso.MyTests.exe' -``` +- Run `dotnet test` command manually, similar to the typical local workflow: + + ```yml + - task: CmdLine@2 + displayName: "Run tests" + inputs: + script: 'dotnet test' # add command-line options as needed + ``` + +- Run using `DotNetCoreCLI` Azure task with test command (requires that you have [`global.json`](../tools/global.json) file in repository root that specifies Microsoft.Testing.Platform as the test runner): + + ```yml + - task: DotNetCoreCLI@2 + displayName: "Run tests" + inputs: + command: test + ``` + + > [!NOTE] + > The supporting for Microsoft.Testing.Platform in `DotNetCoreCLI` was added in [2.263.0](https://github.com/microsoft/azure-pipelines-tasks/pull/21315) version of the task. --- From 662400a48713d5f53258ab4eb169f4123a668dd2 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 2 Dec 2025 13:56:27 +0100 Subject: [PATCH 2/4] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/core/testing/microsoft-testing-platform-intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/testing/microsoft-testing-platform-intro.md b/docs/core/testing/microsoft-testing-platform-intro.md index 3cb702d0cc8e0..93c6a4ce3179a 100644 --- a/docs/core/testing/microsoft-testing-platform-intro.md +++ b/docs/core/testing/microsoft-testing-platform-intro.md @@ -203,7 +203,7 @@ To run a test, navigate to **Test Explorer**, select the test (or tests) to run. ``` > [!NOTE] - > The supporting for Microsoft.Testing.Platform in `DotNetCoreCLI` was added in [2.263.0](https://github.com/microsoft/azure-pipelines-tasks/pull/21315) version of the task. + > Support for Microsoft.Testing.Platform in `DotNetCoreCLI` was added in [2.263.0](https://github.com/microsoft/azure-pipelines-tasks/pull/21315) version of the task. --- From b0b939e45f7ffc7b292f76821d781d48d50e02ea Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 2 Dec 2025 13:57:35 +0100 Subject: [PATCH 3/4] Fix link --- docs/core/testing/microsoft-testing-platform-intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/testing/microsoft-testing-platform-intro.md b/docs/core/testing/microsoft-testing-platform-intro.md index 93c6a4ce3179a..538b3eb8249f9 100644 --- a/docs/core/testing/microsoft-testing-platform-intro.md +++ b/docs/core/testing/microsoft-testing-platform-intro.md @@ -193,7 +193,7 @@ To run a test, navigate to **Test Explorer**, select the test (or tests) to run. script: 'dotnet test' # add command-line options as needed ``` -- Run using `DotNetCoreCLI` Azure task with test command (requires that you have [`global.json`](../tools/global.json) file in repository root that specifies Microsoft.Testing.Platform as the test runner): +- Run using `DotNetCoreCLI` Azure task with test command (requires that you have [`global.json`](../tools/global-json.md) file in repository root that specifies Microsoft.Testing.Platform as the test runner): ```yml - task: DotNetCoreCLI@2 From bfcb274886896289b9af841200a4f1ae2ea9ac2c Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 2 Dec 2025 19:19:46 +0100 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Meaghan Osagie (Lewis) --- docs/core/testing/microsoft-testing-platform-intro.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/core/testing/microsoft-testing-platform-intro.md b/docs/core/testing/microsoft-testing-platform-intro.md index 538b3eb8249f9..cf7cf7939dbd4 100644 --- a/docs/core/testing/microsoft-testing-platform-intro.md +++ b/docs/core/testing/microsoft-testing-platform-intro.md @@ -175,7 +175,7 @@ To run a test, navigate to **Test Explorer**, select the test (or tests) to run. ### [Continuous integration (CI)](#tab/continuous-integration) -- To run a single test project in CI, add one step for each test executable that you wish to run, such as this on Azure DevOps: +- To run a single test project in CI, add one step for each test executable that you wish to run, such as the following on Azure DevOps: ```yml - task: CmdLine@2 @@ -184,7 +184,7 @@ To run a test, navigate to **Test Explorer**, select the test (or tests) to run. script: '.\Contoso.MyTests\bin\Debug\net8.0\Contoso.MyTests.exe' ``` -- Run `dotnet test` command manually, similar to the typical local workflow: +- Run the `dotnet test` command manually, similar to the typical local workflow: ```yml - task: CmdLine@2 @@ -193,7 +193,7 @@ To run a test, navigate to **Test Explorer**, select the test (or tests) to run. script: 'dotnet test' # add command-line options as needed ``` -- Run using `DotNetCoreCLI` Azure task with test command (requires that you have [`global.json`](../tools/global-json.md) file in repository root that specifies Microsoft.Testing.Platform as the test runner): +- Run using the `DotNetCoreCLI` Azure task with test command (requires that you have [`global.json`](../tools/global-json.md) file in repository root that specifies Microsoft.Testing.Platform as the test runner): ```yml - task: DotNetCoreCLI@2