Skip to content

Commit a33ca0b

Browse files
Merge pull request #407 from MarcoRossignoli/troubleshootingguide
Add troubleshooting guide
2 parents 6524812 + 4712d87 commit a33ca0b

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

Documentation/Troubleshooting.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Troubleshooting
2+
3+
## Msbuild Integration
4+
5+
1) Generate verbose log
6+
```
7+
dotnet test test\coverlet.core.tests\coverlet.core.tests.csproj -c debug /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include=[coverlet.*]* -verbosity:diagnostic -bl:msbuild.binlog -noconsolelogger
8+
```
9+
10+
2) Download http://msbuildlog.com/
11+
3) Open `msbuild.binlog` generated and search for '[coverlet]' logs
12+
13+
![File](images/file.png)
14+
15+
## Coverlet Global Tool
16+
17+
```
18+
coverlet "C:\git\coverlet\test\coverlet.core.tests\bin\Debug\netcoreapp2.0\coverlet.core.tests.dll" --target "dotnet" --targetargs "test C:\git\coverlet\test\coverlet.core.tests --no-build" --verbosity detailed
19+
```
20+
Sample output
21+
```
22+
...
23+
Instrumented module: 'C:\git\coverlet\test\coverlet.core.tests\bin\Debug\netcoreapp2.0\coverlet.core.dll'
24+
Instrumented module: 'C:\git\coverlet\test\coverlet.core.tests\bin\Debug\netcoreapp2.0\xunit.runner.reporters.netcoreapp10.dll'
25+
Instrumented module: 'C:\git\coverlet\test\coverlet.core.tests\bin\Debug\netcoreapp2.0\xunit.runner.utility.netcoreapp10.dll'
26+
Instrumented module: 'C:\git\coverlet\test\coverlet.core.tests\bin\Debug\netcoreapp2.0\xunit.runner.visualstudio.dotnetcore.testadapter.dll'
27+
Test run for C:\git\coverlet\test\coverlet.core.tests\bin\Debug\netcoreapp2.0\coverlet.core.tests.dll(.NETCoreApp,Version=v2.0)
28+
Microsoft (R) Test Execution Command Line Tool Version 16.0.1
29+
Copyright (c) Microsoft Corporation. All rights reserved.
30+
Starting test execution, please wait...
31+
[xUnit.net 00:00:01.4218329] Coverlet.Core.Tests.Instrumentation.ModuleTrackerTemplateTests.HitsOnMultipleThreadsCorrectlyCounted [SKIP]
32+
Skipped Coverlet.Core.Tests.Instrumentation.ModuleTrackerTemplateTests.HitsOnMultipleThreadsCorrectlyCounted
33+
[xUnit.net 00:00:03.6302618] Coverlet.Core.Instrumentation.Tests.InstrumenterTests.TestCoreLibInstrumentation [SKIP]
34+
Skipped Coverlet.Core.Instrumentation.Tests.InstrumenterTests.TestCoreLibInstrumentation
35+
Total tests: 113. Passed: 111. Failed: 0. Skipped: 2.
36+
Test Run Successful.
37+
Test execution time: 4,6411 Seconds
38+
39+
Calculating coverage result...
40+
Hits file:'C:\Users\Marco\AppData\Local\Temp\coverlet.core_703263e9-21f0-4d1c-9ce3-98ddeacecc01' not found for module: 'coverlet.core'
41+
Generating report 'C:\git\coverlet\src\coverlet.console\bin\Debug\netcoreapp2.2\coverage.json'
42+
+--------------------------------------------------+--------+--------+--------+
43+
| Module | Line | Branch | Method |
44+
+--------------------------------------------------+--------+--------+--------+
45+
| coverlet.core | 0% | 0% | 0% |
46+
+--------------------------------------------------+--------+--------+--------+
47+
| xunit.runner.reporters.netcoreapp10 | 2,11% | 0,83% | 8,88% |
48+
+--------------------------------------------------+--------+--------+--------+
49+
| xunit.runner.utility.netcoreapp10 | 12,06% | 6,6% | 17,09% |
50+
+--------------------------------------------------+--------+--------+--------+
51+
| xunit.runner.visualstudio.dotnetcore.testadapter | 50,04% | 42,08% | 50,9% |
52+
+--------------------------------------------------+--------+--------+--------+
53+
54+
+---------+--------+--------+--------+
55+
| | Line | Branch | Method |
56+
+---------+--------+--------+--------+
57+
| Total | 17,76% | 13,82% | 22,64% |
58+
+---------+--------+--------+--------+
59+
| Average | 4,44% | 3,455% | 5,66% |
60+
+---------+--------+--------+--------+
61+
```

Documentation/images/file.png

22.5 KB
Loading

0 commit comments

Comments
 (0)