-
Notifications
You must be signed in to change notification settings - Fork 389
Feature Request: New dotnet tool command for merging results in standalone mode #1015
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
You can solve this now by configuring Coverlet to output e.g. cobertura or opencover files instead of it's own format, and then use https://github.com/danielpalme/ReportGenerator to merge them into a single result (as well as applying additional filtering of the results if desired). (It has been discussed to add separate merge steps, but I can't find the issue for that now.) |
FYI @jakubch1 |
Thanks for the suggestion. I agree. Certainly it is possible to do so. There are a couple of things that I'd say to that, which in my opinion makes the flow less than ideal:
|
This was the discussion #683 (comment)
Report generator is used also by AzDo https://docs.microsoft.com/en-us/azure/devops/release-notes/2019/sprint-150-update#cobertura-code-coverage-report-updates |
As part of this: microsoft/vstest#1811 effort we will also add extensibility for other data collectors (for example coverlet). Then we also want to onboard coverlet to this logic. At the end running |
Thanks @jakubch1 - what is the current timeline on delivering the work? When is 16.9.0? Also I'm assuming that it would mean reports from a single |
Adding @cvpoienaru who is working on the change. |
This issue is stale because it has been open for 3 months with no activity. |
Came here looking for the same thing. Our unit test runs are taking an incredible amount of time and we want to look into parallelizing the test run by slicing tests onto multiple azure devops agents. The problem we will have is that we still need to merge the final report. It would be ideal if coverlet offered a standalone feature that could merge multiple json reports so I don't need to bring report generator into the mix. Has there been any movement here? |
If you use cobertura format instead of json this tool could help meanwhile https://learn.microsoft.com/en-us/dotnet/core/additional-tools/dotnet-coverage#merge-code-coverage-reports cc: @jakubch1 |
This issue is stale because it has been open for 3 months with no activity. |
Tip Some alternative solutions to merge coverage files
|
N.B. Alert! :)
I just started looking into adopting coverlet for our code coverage purpose. We run tests across many different modules not only with parallelism within the test job, but also across several different jobs running in parallel in our pipeline. Having to run tests in serial would be a huge (and unacceptable) blow back to our pipeline latency. Aside from that, I've noticed from several threads in here that MergeWith has its issues right now, even when executing tests in parallel. So I have a feature request, that should be fairly easy to implement. In fact, I just prototyped it for myself:
Why not have a dotnet tool command for merging existing json reports into a single final report. That way one can still do a massively parallel testing, and just run the command to merge all the results together. That command seems to be performing well even if results are merged in a single thread, but ultimately if needed, can be further enhanced to work in a multi-threaded mode using concurrent dictionaries and what not to replace the existing single-threaded data structures that are used for representing the results.
So, the pipeline would look like this (an approximation of the actual syntax just to convey the point):
Does this sound reasonable?
The text was updated successfully, but these errors were encountered: