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: Readme.md
+23-14Lines changed: 23 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
<img src="favicon.png" alt="Icon" />
20
20
</p>
21
21
22
-
**GitHub Actions Test Logger** is an extension for **VSTest** and **Microsoft.Testing.Platform**for reporting test results to GitHub Actions.
22
+
**GitHub Actions Test Logger** is an extension for **VSTest** and **Microsoft.Testing.Platform**that reports test results to GitHub Actions.
23
23
It lists failed tests in job annotations, highlights them in code diffs, and produces detailed job summaries about the executed test runs.
24
24
25
25
## Terms of use<sup>[[?]](https://github.com/Tyrrrz/.github/blob/master/docs/why-so-political.md)</sup>
@@ -69,13 +69,18 @@ jobs:
69
69
uses: actions/setup-dotnet@v4
70
70
71
71
- name: Build & test
72
-
# For .NET 9 and lower, add an extra empty double dash sequence (--) before reporter options
72
+
# Can also use with `dotnet run` or `dotnet exec`, depending on your setup.
73
+
# For .NET 9 and lower, add an extra empty double dash sequence (--) before reporter options.
73
74
run: dotnet test --configuration Release --report-github
74
75
```
75
76
76
-
> **Important**:
77
-
> The extension has a peer dependency on **Microsoft.Testing.Platform** when used in this mode.
78
-
> Your test project may already have a reference to this package, but make sure it is updated to the latest version.
77
+
> [!IMPORTANT]
78
+
> If you are using **Microsoft.Testing.Platform** with **xUnit v3**, then make sure to replace the `xunit.v3` package reference with [`xunit.v3.mtp-v2`](https://nuget.org/packages/xunit.v3.mtp-v2).
79
+
> The base `xunit.v3` package relies on MTP v1, which is incompatible with this extension.
80
+
81
+
> [!IMPORTANT]
82
+
> The extension has a peer dependency on the [**Microsoft.Testing.Platform**](https://nuget.org/packages/Microsoft.Testing.Platform) package when used in this mode.
83
+
> It is **highly recommended** to install the latest version of this package in your test project to ensure compatibility.
run: dotnet test --configuration Release --logger GitHubActions
101
106
```
102
107
103
-
> **Important**:
104
-
> The extension has a peer dependency on **Microsoft.NET.Test.Sdk** when used in this mode.
105
-
> Your test project may already have a reference to this package, but make sure it is updated to the latest version.
108
+
> [!IMPORTANT]
109
+
> If you are using **VSTest** with **xUnit v3**, then make sure to replace the `xunit.v3` package reference with [`xunit.v3.mtp-off`](https://nuget.org/packages/xunit.v3.mtp-off).
110
+
> The base `xunit.v3` package has a built-in dependency on MTP, which may cause conflicts with this extension.
111
+
112
+
> [!IMPORTANT]
113
+
> The extension has a peer dependency on the [**Microsoft.NET.Test.Sdk**](https://nuget.org/packages/Microsoft.NET.Test.Sdk) package when used in this mode.
114
+
> It is **highly recommended** to install the latest version of this package in your test project to ensure compatibility.
106
115
107
-
> **Important**:
116
+
> [!IMPORTANT]
108
117
> If you are using **.NET SDK v2.2 or lower**, you need to [set the `<CopyLocalLockFileAssemblies>` property to `true` in your test project](https://github.com/Tyrrrz/GitHubActionsTestLogger/issues/5#issuecomment-648431667).
109
118
110
119
#### Collecting source information
111
120
112
121
**GitHub Actions Test Logger** can leverage source information to link reported test results to the locations in the source code where the corresponding tests are defined.
113
-
By default, VSTest does not collect source information, so the extension relies on stack traces to extract it manually.
122
+
By default, **VSTest** does not collect source information, so the extension relies on stack traces to extract it manually.
114
123
This approach only works for failed tests, and even then may not always be fully accurate.
115
124
116
125
To instruct the runner to collect source information, add the `RunConfiguration.CollectSourceInformation=true` argument to the command as shown below:
@@ -133,10 +142,10 @@ jobs:
133
142
RunConfiguration.CollectSourceInformation=true
134
143
```
135
144
136
-
> **Note**:
145
+
> [!NOTE]
137
146
> This option can also be enabled by setting the corresponding property in a [`.runsettings` file](https://learn.microsoft.com/en-us/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file) instead.
138
147
139
-
> **Warning**:
148
+
> [!WARNING]
140
149
> Source information collection may not work properly with the legacy .NET Framework.
141
150
142
151
### Customizing behavior
@@ -222,7 +231,7 @@ Use the `[--report-github-]summary-include-passed` option to specify whether pas
222
231
223
232
**Default**: `true`.
224
233
225
-
> **Warning**:
234
+
> [!WARNING]
226
235
> If your test suite is really large, enabling this option may cause the summary to exceed the [maximum allowed size](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#step-isolation-and-limits).
227
236
228
237
#### Include skipped tests in the summary
@@ -231,6 +240,6 @@ Use the `[--report-github-]summary-include-skipped` option to specify whether sk
231
240
232
241
**Default**: `true`.
233
242
234
-
> **Warning**:
243
+
> [!WARNING]
235
244
> If your test suite is really large, enabling this option may cause the summary to exceed the [maximum allowed size](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#step-isolation-and-limits).
0 commit comments