Skip to content

Jacoco - line coverage #747

@Vity01

Description

@Vity01

Describe the bug
If I compare the outputs of JSONSummary (as well as the HTML report) and the JaCoCo HTML report, it’s hard not to notice the overall difference in the total number of lines for line coverage — even though the input (jacoco.xml) is exactly the same. In this specific case, the JaCoCo HTML report shows around 1,500 coverable lines total, while Report Designer shows more than 3,000.

After some time investigating, I discovered that Report Designer seems sum of lines of the classes that are part of the same source file (same values are summed multiple times, see attached screenshot).

While this likely doesn’t affect the percentage line coverage ratio itself, it doesn’t look right and gives the impression that something is wrong.

Even so, I still can’t figure out why the percentage line coverage in the JaCoCo report is different. It should be the same value (jacoco HTML report - (1566-233)/1566=85% vs 83%)

Unfortunately, I can’t share the full file, but I’m attaching a screenshot for context and better understanding of the issue.

Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions