-
Notifications
You must be signed in to change notification settings - Fork 389
Using runsettings means sometimes missing coverage info #571
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
Comments
@queen-of-code can you provide a repro? |
Oh one more thing you should upgrade collector to new version https://www.nuget.org/packages/coverlet.collector/ |
I'll try an upgrade. But are you at least able to repro the two very different formats regardless of coverage numbers? Because that's a clean + easy repro for me and should be the same for you. |
@queen-of-code when you update the version to 1.1.0 you need to provide runsettings file with a InProcDataCollectors config because i found and issue on vstest plat collector load and we cannot fix on our side at the moment #576 (comment) <?xml version="1.0" encoding="utf-8" ?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="XPlat code coverage">
<Configuration>
<Format>cobertura</Format>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
<InProcDataCollectionRunSettings>
<InProcDataCollectors>
<InProcDataCollector assemblyQualifiedName="Coverlet.Collector.DataCollection.CoverletInProcDataCollector, coverlet.collector, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null"
friendlyName="XPlat Code Coverage"
enabled="True"
codebase="coverlet.collector.dll" />
</InProcDataCollectors>
</InProcDataCollectionRunSettings>
</RunSettings> |
I'm testing with this now to see if it helps. |
@queen-of-code any news? |
Close for stale conversation. |
I've traced down a harrowing issue with missing code coverage on our build server down to the use of runsettings vs directly invoking the cross-plat coverage via the dotnet test command line.
The repro is very simple for our DLL - of SPECIAL note is that this is the same csproj + test csproj combo that previously was not reporting code coverage before the recent advent of collectors. MOST of our test projects do not have this issue.
Works Fine:
dotnet test --collect:"XPlat Code Coverage"
Output:
Does Not Work:
dotnet test --settings ..\coverlet.runsettings
Output:
Contents of Runsettings file (I've tried with includes and excludes and all combinations thereof):
The test csproj has the following versions:
And we are using
dotnet core sdk 3.0.100
The text was updated successfully, but these errors were encountered: