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
* Update reporting formatting
Improve formatting of the test reporter documentation.
* More formatting
Improve more formatting.
* Apply suggestions from code review
@@ -71,25 +71,27 @@ to one of the following locations:
71
71
dotnet-cli, the path could be `/sdk/<version>/Extensions` directory.
72
72
2. any well known location on the filesystem
73
73
74
-
> Version Note: new in 15.1
75
-
In case of #2, user can specify the full path to the location using `/TestAdapterPath:<path>`
76
-
command line switch. Test platform will locate extensions from the provided
77
-
directory.
74
+
> [!NOTE]
75
+
> **New in 15.1**
76
+
>
77
+
> In case of #2, user can specify the full path to the location using `/TestAdapterPath:<path>`
78
+
> command line switch. Test platform will locate extensions from the provided
79
+
> directory.
78
80
79
81
## Naming
80
82
81
83
Test platform will look for assemblies named `*.testlogger.dll` when it's trying
82
84
to load test loggers.
83
85
84
-
> Version Note: < 15.1
85
-
> For 15.0 version, the test loggers are also discovered from *.testadapter.dll
86
+
> [!NOTE]
87
+
> For the 15.0 version, the test loggers are also discovered from `*.testadapter.dll`
86
88
87
89
## Create a test logger
88
90
89
91
Go through the following steps to create your own logger
90
92
91
93
1) Add a nuget reference of package `Microsoft.TestPlatform.ObjectModel`.
92
-
2) Implement ITestLoggerWithParameters (or ITestLogger, if your logger is not expecting any parameter). [Logger Example](https://github.com/spekt/xunit.testlogger/blob/master/src/Xunit.Xml.TestLogger/XunitXmlTestLogger.cs#L19)
94
+
2) Implement `ITestLoggerWithParameters` (or `ITestLogger`, if your logger is not expecting any parameters). [Logger Example](https://github.com/spekt/xunit.testlogger/blob/49d2416f24acb30225adc6e65753cc829010bec9/src/Xunit.Xml.TestLogger/XunitXmlTestLogger.cs#L19)
93
95
3) Name your logger assembly `*.testlogger.dll`. [Detailed](./report.md#naming)
94
96
95
97
## Enable a test logger
@@ -100,7 +102,7 @@ A test logger must be explicitly enabled using the command line. E.g.
100
102
vstest.console test_project.dll /logger:mylogger
101
103
```
102
104
103
-
Where `mylogger` is the LoggerUri or FriendlyName of the logger.
105
+
Where `mylogger` is the `LoggerUri` or `FriendlyName` of the logger.
104
106
105
107
## Configure reporting
106
108
@@ -110,40 +112,48 @@ Additional arguments to a logger can also be passed in the command line. E.g.
If you are using "dotnet test", then use the following command
148
+
If you are using `dotnet test`, then use the following command:
142
149
150
+
```shell
143
151
dotnet test Tests.csproj --logger:"console;verbosity=normal"
152
+
```
144
153
145
-
or you can also use argument "-v | --verbosity" of "dotnet test"
154
+
or you can also use argument `-v | --verbosity` of `dotnet test`:
146
155
156
+
```shell
147
157
dotnet test Tests.csproj -v normal
148
158
```
149
159
@@ -155,28 +165,35 @@ Trx logger is used to log test results into a Visual Studio Test Results File (T
155
165
156
166
```shell
157
167
/logger:trx [;LogFileName=<Defaults to unique file name>]
158
-
159
-
Where "LogFileName" can be absolute or relative path. If path is relative, it will be relative to "TestResults" directory, created under current working directory.
160
168
```
161
169
170
+
Where `LogFileName` can be absolute or relative path. If the path is relative, it will be relative to the `TestResults` directory, created under current working directory.
171
+
172
+
162
173
#### Examples
163
174
164
-
Suppose the current working directory is "c:\tempDirecory".
175
+
Suppose the current working directory is `c:\tempDirectory`.
165
176
166
177
```shell
167
-
1) vstest.console.exe Tests.dll /logger:trx
168
-
trx file will get generated in location "c:\tempDirecory\TestResults"
178
+
vstest.console.exe Tests.dll /logger:trx
179
+
```
180
+
181
+
trx file will get generated in location `c:\tempDirectory\TestResults`.
0 commit comments