Has unit tests but sonarqube code coverage still 0.0%

Must-share information (formatted with Markdown):

  • SonarQube 8.3.1 -community
  • springcloud api gateway project with gradle
  • I have write unit tests in my project and jacoco can export exec files but but when i ‘./gradlew clean build sonar’ then sonarqube code coverage still 0.0%


Thanks for any help!


details

Hi,

Welcome to the community!

It looks like maybe your .exec files aren’t being imported by analysis? (Check your build/analysis logs to be sure.) Anyway, that format is deprecated. Since you need to work on this import anyway, while you’re doing it you should switch to the .xml format.

 
HTH,
Ann

Hi Ann
I have resolve this problem and thanks for your help .
The key was in jacoco’s gradle config and it’s need to be xml.enabled true.
Thank’s for help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.