Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions docs/core/testing/microsoft-testing-platform-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Use the following path based on your goal:

- Need to customize terminal output: [Terminal output](./microsoft-testing-platform-terminal-output.md) (built-in)
- Need TRX or Azure DevOps reports: [Test reports](./microsoft-testing-platform-test-reports.md) (extension)
- Need GitHub Actions-native output (log groups, annotations, and job summary): [GitHub Actions report](https://www.nuget.org/packages/Microsoft.Testing.Extensions.GitHubActionsReport) (extension, experimental)
- Need GitHub Actions-native output (log groups, annotations, and job summary): [GitHub Actions report](./microsoft-testing-platform-test-reports.md#github-actions-reports) (extension, experimental)
- Need coverage data: [Code coverage](./microsoft-testing-platform-code-coverage.md) (extension)
- Need crash or hang diagnostics: [Crash and hang dumps](./microsoft-testing-platform-crash-hang-dumps.md) (extension)
- Need to retry failed tests: [Retry](./microsoft-testing-platform-retry.md#retry) (extension)
Expand All @@ -54,11 +54,7 @@ These features require installing NuGet packages.

**[Test reports](./microsoft-testing-platform-test-reports.md)**

Generate test report files (TRX, Azure DevOps).

**[GitHub Actions report](https://www.nuget.org/packages/Microsoft.Testing.Extensions.GitHubActionsReport)** (experimental, introduced in MTP 2.3.0)

Emit GitHub Actions-native workflow commands so test runs produce a first-class experience: per-assembly log groups, failure annotations (surfaced in the workflow **Annotations** tab and, when the source location resolves, on the pull request's **Files changed** diff), a Markdown job summary appended to `GITHUB_STEP_SUMMARY`, and slow-test notices. The extension activates automatically when the `GITHUB_ACTIONS` environment variable is `true`, or elsewhere with the `--report-gh` switch. Each feature can be turned on or off individually with the `--report-gh-groups`, `--report-gh-annotations`, `--report-gh-step-summary`, and `--report-gh-slow-test-notices` options, and the slow-test threshold is set with `--report-gh-slow-test-threshold`. Register it manually with `builder.AddGitHubActionsProvider()`.
Generate test report files (TRX, HTML, JUnit, CTRF, Azure DevOps, GitHub Actions).

**[Code coverage](./microsoft-testing-platform-code-coverage.md)**

Expand Down
29 changes: 28 additions & 1 deletion docs/core/testing/microsoft-testing-platform-test-reports.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Microsoft.Testing.Platform (MTP) test reports
description: Learn about the MTP extensions that create test report files (TRX, HTML, JUnit, CTRF, Azure DevOps).
description: Learn about the MTP extensions that create test report files (TRX, HTML, JUnit, CTRF, Azure DevOps, GitHub Actions).
author: evangelink
ms.author: amauryleve
ms.date: 06/16/2026
Expand Down Expand Up @@ -163,3 +163,30 @@ builder.TestHost.AddAzureDevOpsProvider();
> The Azure DevOps extension became stable in MTP 1.9.0 (`--report-azdo` and `--report-azdo-severity`). All other options in the table — `--report-azdo-flaky-history`, `--report-azdo-demote-known-flaky`, `--report-azdo-quarantine-file`, `--report-azdo-summary`, `--report-azdo-stackframe-filter`, `--report-azdo-upload-artifacts`, `--report-azdo-upload-artifact-include`, `--report-azdo-upload-artifact-exclude`, `--report-azdo-upload-artifact-name`, `--publish-azdo-test-results`, and `--publish-azdo-run-name` — are available in MTP starting with version 2.3.0.

The extension automatically detects that it is running in continuous integration (CI) environment by checking the `TF_BUILD` environment variable.

## GitHub Actions reports

The GitHub Actions report emits GitHub Actions-native workflow commands so test runs produce a first-class experience on the runner: per-assembly log groups, failed and skipped test annotations (surfaced in the workflow **Annotations** tab and, when the source location resolves, on the pull request's **Files changed** diff), a Markdown job summary appended to the file referenced by `GITHUB_STEP_SUMMARY`, and slow-test notices.

The extension activates only when the run is on GitHub Actions (the `GITHUB_ACTIONS` environment variable is `true`) and the `--report-gh` switch is set; otherwise it does nothing. When active, each feature is enabled by default and can be turned off individually with its `--report-gh-*` option.

> [!NOTE]
> Available in MTP starting with version 2.3.0. This extension is experimental, and its options and output format might change in a future version.

### Manual registration

```csharp
var builder = await TestApplication.CreateBuilderAsync(args);
builder.AddGitHubActionsProvider();
```

### Options

| Option | MTP version | Description |
|---|---|---|
| `--report-gh` | 2.3.0 | Enables the GitHub Actions report generator so test runs emit workflow commands. Requires the run to be on GitHub Actions. |
| `--report-gh-groups` | 2.3.0 | Enables or disables per-assembly log groups. Valid values are `on` (default) and `off`. Requires `--report-gh`. |
| `--report-gh-annotations` | 2.3.0 | Enables or disables annotations for failed and skipped tests. Valid values are `on` (default) and `off`. Requires `--report-gh`. |
| `--report-gh-step-summary` | 2.3.0 | Enables or disables writing a Markdown job summary to the file referenced by `GITHUB_STEP_SUMMARY`. Valid values are `on` (default) and `off`. Requires `--report-gh`. |
| `--report-gh-slow-test-notices` | 2.3.0 | Enables or disables slow-test notices. Valid values are `on` (default) and `off`. Requires `--report-gh`. |
| `--report-gh-slow-test-threshold` | 2.3.0 | The duration a test can run before a slow-test notice is emitted. Accepts a bare number of seconds or a value with a unit suffix such as `90s`, `2m`, or `1.5h`. The default is `60s`. Requires `--report-gh`. |
2 changes: 1 addition & 1 deletion docs/navigate/devops-testing/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ items:
displayName: MTP,terminal,test reporter,ANSI,progress
- name: Test reports
href: ../../core/testing/microsoft-testing-platform-test-reports.md
displayName: MTP,TRX,test report,Azure DevOps
displayName: MTP,TRX,test report,Azure DevOps,GitHub Actions
- name: Code coverage
href: ../../core/testing/microsoft-testing-platform-code-coverage.md
displayName: MTP,code coverage,coverage
Expand Down
Loading