Code coverage not visible in SonarQube UI

I am trying to establish a static code analysis using SonarQube. Created a project in SonarQube UI. Ran the sonarscanner within Jenkins pipeline.

The pipeline ran successfully and the report was published to SonarQube but it is not showing the code coverage

Although the Quality Gate being used for this project has the condition of code coverage more than 80%, so if the code analysis shows passed it implies that code coverage is more than 80% so why it’s not showing in the UI or was it not used which doing the analysis. Do I need to use jacoco plugin?

Any pointers would be much appreciated.

Thanks

Hi,

I understand your very reasonable confusion.

What’s going on here is the difference between ‘0’ and ‘-’. A 0 would indicate no coverage. A ‘-’ indicates no coverage information. And when there’s no coverage information passed in to an analysis, coverage-related conditions aren’t applied IIRC.

So this becomes a question of getting your coverage report generated (outside the scope of this community) and imported into analysis.

 
HTH,
Ann

thanks for your insight @ganncamp