Skip to content

Commit c8add7d

Browse files
Youssef1313Copilotmeaghanlewis
authored
Improve MTP overview doc (#50257)
* Improve MTP overview doc * Apply suggestions from code review Co-authored-by: Copilot <[email protected]> * Fix link * Apply suggestions from code review Co-authored-by: Meaghan Osagie (Lewis) <[email protected]> --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Meaghan Osagie (Lewis) <[email protected]>
1 parent b8d2688 commit c8add7d

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

docs/core/testing/microsoft-testing-platform-intro.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,35 @@ To run a test, navigate to **Test Explorer**, select the test (or tests) to run.
175175
176176
### [Continuous integration (CI)](#tab/continuous-integration)
177177

178-
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.
178+
- 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:
179179

180-
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:
180+
```yml
181+
- task: CmdLine@2
182+
displayName: "Run Contoso.MyTests"
183+
inputs:
184+
script: '.\Contoso.MyTests\bin\Debug\net8.0\Contoso.MyTests.exe'
185+
```
181186
182-
```yml
183-
- task: CmdLine@2
184-
displayName: "Run Contoso.MyTests"
185-
inputs:
186-
script: '.\Contoso.MyTests\bin\Debug\net8.0\Contoso.MyTests.exe'
187-
```
187+
- Run the `dotnet test` command manually, similar to the typical local workflow:
188+
189+
```yml
190+
- task: CmdLine@2
191+
displayName: "Run tests"
192+
inputs:
193+
script: 'dotnet test' # add command-line options as needed
194+
```
195+
196+
- 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):
197+
198+
```yml
199+
- task: DotNetCoreCLI@2
200+
displayName: "Run tests"
201+
inputs:
202+
command: test
203+
```
204+
205+
> [!NOTE]
206+
> 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.
188207

189208
---
190209

0 commit comments

Comments
 (0)