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
By default, Coverlet will validate the threshold value against the coverage result of each module. The `--threshold-stat` option allows you to change this behaviour and can have any of the following values:
179
+
180
+
* Minimum (Default): Ensures the coverage result of each module isn't less than the threshold
181
+
* Total: Ensures the total combined coverage result of all modules isn't less than the threshold
182
+
* Average: Ensures the average coverage result of all modules isn't less than the threshold
183
+
184
+
The following command will compare the threshold value with the overall total coverage of all modules:
185
+
186
+
```bash
187
+
coverlet <ASSEMBLY> --target <TARGET> --targetargs <TARGETARGS> --threshold 80 --threshold-type line --threshold-stat total
188
+
```
189
+
176
190
#### Excluding From Coverage
177
191
178
192
##### Attributes
@@ -308,6 +322,18 @@ dotnet test /p:CollectCoverage=true /p:Threshold=80 /p:ThresholdType=line
308
322
309
323
You can specify multiple values for`ThresholdType` by separating them with commas. Valid values include `line`, `branch` and `method`.
310
324
325
+
By default, Coverlet will validate the threshold value against the coverage result of each module. The `/p:ThresholdStat` option allows you to change this behaviour and can have any of the following values:
326
+
327
+
* Minimum (Default): Ensures the coverage result of each module isn't less than the threshold
328
+
* Total: Ensures the total combined coverage result of all modules isn't less than the threshold
329
+
* Average: Ensures the average coverage result of all modules isn't less than the threshold
330
+
331
+
The following command will compare the threshold value with the overall total coverage of all modules:
332
+
333
+
```bash
334
+
dotnet test /p:CollectCoverage=true /p:Threshold=80 /p:ThresholdType=line /p:ThresholdStat=total
335
+
```
336
+
311
337
#### Excluding From Coverage
312
338
313
339
##### Attributes
@@ -361,6 +387,10 @@ Both `Exclude` and `Include` properties can be used together but `Exclude` takes
361
387
362
388
You can specify multiple filter expressions by separting them with a comma (`,`).
363
389
390
+
### SourceLink
391
+
392
+
Coverlet supports [SourceLink](https://github.com/dotnet/sourcelink) custom debug information contained in PDBs. When you specify the `--use-source-link` flag in the global tool or `/p:UseSourceLink=true` property in the MSBuild command, Coverlet will generate results that contain the URL to the source files in your source control instead of absolute file paths.
393
+
364
394
### Cake Addin
365
395
If you're using [Cake Build](https://cakebuild.net) foryour build script you can use the [Cake.Coverlet](https://github.com/Romanx/Cake.Coverlet) addin to provide you extensions to dotnet test for passing coverlet argumentsin a strongly typed manner.
0 commit comments