Unable to get report from Jacoco Gradle Kotlin project on SonarCloud

Hey there.

This thread is fine – but a little patience is appreciated, since you only responded yesterday.

To me – the coverage report and SonarCloud match what I would expect. It shows 3/4 of lines covered (75% of lines covered) and no branches (no if or switch statements), and this aligns with how SonarCloud calculates coverage, a mixture of branch and line coverage.

The “64%” you’re seeing is instruction coverage – which isn’t represented in SonarQube. While a good indicator (independent of source code formatting) of how much code is covered, it takes significantly more work to make sense of these numbers and how you should change your code/tests as a result.

So SonarQube isn’t determining coverage on its own (it relies on the report), it just doesn’t consider instruction coverage. You might find this StackOverflow post interesting

1 Like