-
-
Notifications
You must be signed in to change notification settings - Fork 62
Report Cobertura XML format #383
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
Conversation
I removed several useless fields in the report. This diff uses the minimal information about lines covered and rates. The PR is then ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks basically good. What are you using to view (render) the Cobertura reports?
I am using directly the cobertura report in GitLab: stages:
- test
variables:
coverage_report_view: "true"
coverage:
stage: test
script:
- echo \"making the coverage\"
artifacts:
paths:
- ./coverage/cobertura-coverage.xml
reports:
cobertura: coverage/cobertura-coverage.xml Then, I push the cobertura generated by bisect in a MR: https://gitlab.com/vch9/corbetura-reports/-/merge_requests/5/diffs (If you don't see any colors; you should refresh the page) |
Is this rendered somewhere on GitLab, that you could share a link to? I wasn't able to find it in a few minutes. I do see the MR diffs, pipelines, even raw coverage reports, but not rendered coverage reports. |
The rendered coverage reports is directly inside the diffs (as in GitLab documentation). Do you expect another form of rendered coverage reports or you just don't see the coverage in diffs? |
That's weird, even if I open in another browser (not logged in) I can see them. Can you try to refresh the page? Sometimes the colors appear after a couple refresh (lost a couple hours on this).
That is pretty complicated but I did not manage at this point a better way to test the format :/ |
Ah, it's working now after some refershes. I didn't know if that's what you originally meant by refreshing if I don't see any colors, because I saw the regular diff colors and didn't know if there were more I should be looking for :) Thanks! |
Thank you! This looks good to me! Do you want to do anything else to it in this PR? Or may I merge it? :) |
Thank you for your quick review!
If you don't care about the commits and squash it all you can merge this now :) |
However, we are currently integrating this report in the Tezos CI, maybe we can wait for a large-scale test on Tezos before merging this. Alternatively, I can make a follow-up MR if I find flaws. |
I am merging this now, as it does some refactoring, and it's best not to leave such PRs hanging. I'll be happy to review and merge any follow-on PRs :) Thanks! Note I had to avoid a few functions ( |
FYI I'm doing a bunch of refactoring in |
Thank you! I'll pay attention next time and work with a dedicated switch.
I started to integrate this report in our project and it's working fine for now, there should not be changes in the near future. Thank you though for the notice :) |
I'm creating this PR
a bit early to gather your viewson this @aantron. This is the minimal working version of reporting to Cobertura XML.Some fields inRemoved, they were useless.type cobertura
such asbranches_covered
,branches_valid
etc. might be removed in the near future.I took inspiration from examples linked in #326 (e.g. this) and I need to see which fields are mandatory.
On top of the commit 352a5d1, I produced the report with the rule
cobertura
and used it in this diff.Closes #326 (I'm closing a closed issue :p)