Skip to content
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

Branch coverage percentage differs between SonarQube and Quality-time #1346

Open
fniessink opened this issue Aug 3, 2020 · 0 comments
Open

Comments

@fniessink
Copy link
Member

SonarQube calculates (see https://docs.sonarqube.org/latest/user-guide/metric-definitions/):

Condition coverage = (CT + CF) / (2*B)
where

  • CT = conditions that have been evaluated to 'true' at least once
  • CF = conditions that have been evaluated to 'false' at least once
  • B = total number of conditions

And Quality-time calculates: uncovered conditions/total number of conditions.

Unfortunately, the CT and CF metrics are not available in the SonarQube API.

Proposed solution: for the percentage scale of the branch coverage metric, use the percentage from SonarQube (instead of calculating it) and for the count scale use the uncovered conditions (same as now).

@fniessink fniessink added the Bug label Aug 3, 2020
@fniessink fniessink added this to the Patch milestone Aug 3, 2020
@fniessink fniessink assigned fniessink and unassigned fniessink Aug 7, 2020
@fniessink fniessink removed this from the Patch milestone Aug 21, 2020
@fniessink fniessink moved this to Wait for use case in Quality-time backlog May 24, 2024
@fniessink fniessink removed the Bug label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Wait for use case
Development

No branches or pull requests

1 participant