Jacoco report which generated locally by developer and sonarqube UI coverage which imports the report and display the coverage isn’t the same. What could be the reason for such behaviour.
The Jacoco report which generated locally,it shows 87%
Great question—this trips up a lot of folks integrating JaCoCo with SonarQube! The coverage numbers differ because SonarQube calculates coverage differently.
Your local JaCoCo report shows 87.7%, which is just line coverage (covered lines ÷ total lines). SonarQube, though, uses both line and branch coverage. Its formula is: