jenkinsci / jenkinsci/coverage-model

[JENKINS-76232] Cobertura line coverage results is wrong

Open
#253 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
10
Forks
43
Avg merge
5d 7h
Merged PRs (30d)
6

Description

I've been using gcovr, Cobertura XML Output, and Cobertura plugin with old API.

I have just swithched to coverage plugin.

The line coverage is different between Cobertura and coverage.

I checked the source code CoberturaParser.java.

In the case of the following xml, the judgment is made if D>0.



Wouldn't it be correct to judge if B>0?

---
Originally reported by kiyoshi, imported from: Cobertura line coverage results is wrong


  • assignee: drulli
  • status: Open
  • priority: Minor
  • component(s): coverage-model
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 20260108-221235

Raw content of original issue

I've been using gcovr, Cobertura XML Output, and Cobertura plugin with old API.

I have just swithched to coverage plugin.

The line coverage is different between Cobertura and coverage.

I checked the source code CoberturaParser.java.

In the case of the following xml, the judgment is made if D>0.


<line number="A" hits="B" branch="true" condition-coverage="C% (D/E)">


Wouldn't it be correct to judge if B>0?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.