-
Notifications
You must be signed in to change notification settings - Fork 330
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
Add Code Coverage targets #1946
Comments
I'm hoping this comes out of recent work to bring up Coverlet on dotnet/machinelearning and dotnet/coreclr. In particular, dotnet/machinelearning has figured out a nice combination of Coverlet+ReportGenerator to produce files consumable by codecov.io.
|
Any updates @sharwell ? |
Not from me, but @ViktorHofer may have updates |
Relates to #2076. After enabling full code coverage in corefx (with codecov) I can help out here. |
Thanks @ViktorHofer |
Hi @ViktorHofer, I see that this issue is a bit old, so checking into see if any requirements have changed on this? Thanks! |
VSTest now supports all the feature that we need. I recommend to use dotnet test's coverlet integration instead of invoking coverlet directly. The necessary work here would be:
Optional:
|
I'm currently not actively working on these things... |
@ViktorHofer Thanks for the update! I've implemented something similar to your suggestion in our services' CI for code coverage, too, so we'll see how much of that we can leverage for this addition to Arcade. |
Happy to help providing something standard using Adding <TestRunnerAdditionalArguments>--collect:"Code Coverage;Format=Cobertura"</TestRunnerAdditionalArguments>
<!-- TODO: On next arcade bump of Microsoft.CodeCoverage/Microsoft.NET.Test.Sdk we will have to update this line to be netstandard2.0 -->
<!-- Because arcade is passing dlls directly to 'dotnet test' command, we need to manually provide path to coverage datacollector -->
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --test-adapter-path $(NUGET_PACKAGES)/microsoft.codecoverage/$(MicrosoftNETTestSdkVersion)/build/netstandard1.0</TestRunnerAdditionalArguments> in some props/target file seems to be enough. Obviously, it would be better to also provide a |
It would be nice to add targets/properties to allow code coverage report generation out of the box in Arcade. Bonus points if it produces a format that AZDO pipelines can ingest by default.
After fiddling with things a bit it seems that the
dotnet exec $(TestRunnerPath)
method of executing tests used by the Xunit target prevents using packages likecoverlet.msbuild
, so an implementation in Arcade or documentation of a simple way to DIY would be ideal.The text was updated successfully, but these errors were encountered: