-
Notifications
You must be signed in to change notification settings - Fork 388
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
How can I union coverage results in one file? #36
Comments
This is especially important if attempting to upload test results to VSTS, which is expecting a single summary file (and grabs the last match if using a glob pattern). |
is there an API to hook in to once all tests are complete? i guess currently a single instance of coverlet doesn't know if it's the last time a test is called and would need to consolidate the results for every test project. |
We run several tests in parallel using gitlab CI so would like to take the output files and combine them to give an overall result. Would be nice if this were possible. |
I'm exploring various possible ways to achieve this. Any ideas are welcome |
While I would also appreciate having this feature, currently as a workaround we are using ReportGenerator (4.0.0-alpha3) to merge all the coverage.xml files to generate a consolidated report. From an implementation point of view, I like how opencover merges/appends output on existing report files if a -mergeoutput parameter is set. |
+1 Any idea - how union coverage results? :) |
@aptester's suggestion works well for generating a report. But not a combined xml for VSTS unfortunately :( |
@tonerdo What do you think about it? Do you have any suggestions for it? Thx. |
i want this so bad! 😉 |
I'm gonna explore how existing tools achieve this and see how best to implement since it's a popular ask. Will go a lot faster if I can get some help 😄 |
I've started something over here, which I'm currently testing and will PR if ready. This basically allows one to merge the coverage result of one run, with an intermediate result of a previous run. It's somewhat similar to what OpenCover offers. Note that this will still generate the 'final' report after each intermediate run, so there is overhead. To use it, you should just add |
Awesome @basilfx, thanks a lot for the help |
The PR is here: #123. |
@basilfx can you please point me to the where OpenCover documents its implementation of this feature? Thanks |
You can find it here: https://github.com/opencover/opencover/wiki/Usage Look for -mergeoutput and -mergebyhash. |
Hello!
I have multiple tests projects - one with unit tests and one with integration tests. How can I calculate code coverage for both projects with coverlet?
The text was updated successfully, but these errors were encountered: