-
Notifications
You must be signed in to change notification settings - Fork 102
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
Reporting incorrect coverage percentage from xml file #49
Comments
here is the above file in a gist: |
I'm having the same issue with XML report lines covered is 8% and this plugin its publishing 45% which is wayyyyy too much of a difference. I see that your math is good at: Line 65 in e1d6655
however I suspect its an issue with the parser, it would be good to add at least a debug mode for more details to see if whats been stored into |
The covertura parser is doing the following calculation:
The lineRate already gives you the % of lines covered, do not understand why branchRate matters in this case. You can find this here: |
Hi, I thought I had the same issue, but actually was able to understand that I wasn't comparing the same thing.. Here's how I found it out : With an aggregated jacoco.xml report (generated with jacoco 0.8.1 and report-aggregate goal) :
--> The coverage that Jacoco displays in the HTML report in the first column is the "instructions coverage" But if you see in later columns, there's a lines section showing 2138 total and 532 missed : this is the data that JacocoParser feteches and uses (2138 - 532 = 1606 covered). So if we are expecting the plugin to show the instructions coverage, then it will very often not macth the expected result, because the plugin is showing the lines coverage == maybe that could be a new feature : being able to specify which one we want the plugin to show - information is readily available in xml, it's just a minor change in the Xpath expression : |
Thanks in advance for looking into this.
I have atttached the xml file that the plugin is reading. In github it says that coverage is 48% but the actual coverage should be 41%.
coverturaXml.docx
The text was updated successfully, but these errors were encountered: