-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverlet showing 0% code coverage #1378
Comments
Most probably you're suffering of a known issue https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/KnownIssues.md#vstest-stops-process-execution-early You should move to the datacollector integration https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md |
I tried to follow instructions for datacollector integration, but generated coverage.cobertura.xml still shows 0 coverage |
I have a similar issue and tracked it down so far, that coverlet seems to be unable to instrument files generated by the source-generator. (copied from my comment)
This does not look connected to https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/KnownIssues.md#vstest-stops-process-execution-early for me.
|
switching to |
When I fall back to coverlet.msbuild 2.5.1, everthing seems to be ok. Starting with coverlet.msbuild 2.6.0 I get empty coverages. (this is no exhaustive analysis, just tested some combinations) |
@MarcoRossignoli would you be so kind and have a look at this? Or should I better create another issue? |
nevermind...my issue was related to #1322. Could fix it. |
It is not really clear what the issue is here because of a pretty stale conversation. |
I have build a Roslyn analyzer with custom rules in .net standard2.0 framework and I have written test cases for rules in .net 4.8 framework project using Xunt. I have setup my coverlet code coverage and install all the required packages in test project but when ever I run the coverlet command : dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura. it gives me 0% in all the coverages
+--------+------+--------+--------+
| Module | Line | Branch | Method |
+--------+------+--------+--------+
+---------+------+--------+--------+
| | Line | Branch | Method |
+---------+------+--------+--------+
| Total | 0% | 0% | 0% |
+---------+------+--------+--------+
| Average | 0% | 0% | 0% |
+---------+------+--------+--------+
The text was updated successfully, but these errors were encountered: