You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/testing/microsoft-testing-platform-extensions-test-reports.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,3 +24,33 @@ The available options as follows:
24
24
|`--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`. |
25
25
26
26
The report is saved inside the default _TestResults_ folder that can be specified through the `--results-directory` command line argument.
27
+
28
+
## Azure DevOps reports
29
+
30
+
Azure DevOps report plugin enhances test running for developers that host their code on GitHub, but build on Azure DevOps build agents. It adds additional information to failures to show failure directly in GitHub PR.
31
+
32
+

33
+
34
+
The extension is shipped in [Microsoft.Testing.Extensions.AzureDevOpsReport](https://nuget.org/packages/Microsoft.Testing.Extensions.AzureDevOpsReport) package.
35
+
36
+
The available options as follows:
37
+
38
+
| Option | Description |
39
+
|--|--|
40
+
|`--report-azdo`| Enable outputting errors / warnings in CI builds. |
41
+
|`--report-azdo-severity`| Severity to use for the reported event. Options are: `error` (default) and `warning`. |
42
+
43
+
The extension automatically detects that it is running in continuous integration (CI) environment by checking the `TF_BUILD` environment variable.
44
+
45
+
### Determining the line to report
46
+
47
+
To highlight the correct line in code where failure occurred, AzureDevOps report plugin searches the error stacktrace for a file that exists in the current repository.
48
+
49
+
To determine this it:
50
+
51
+
- finds the repository root, this is done by searching the `.git` directory closest to the location from where the test application is started (as determined by `AppContext.BaseDirectory`).
52
+
- finds the first line in stack trace that has file location and line (the library needs to have debug symbols).
53
+
- excludes all files that end with `Assert.cs` to avoid showing details of your assertion implementations or wrappers.
54
+
- excludes all files that don't exist on disk (typically those are lines from external libraries that ship debug symbols e.g. MSTest).
55
+
56
+
(These are internal details that serve to aid debugging the behavior and might change in the future.)
0 commit comments