Sonar does not shows up Code Coverage after build successful with Jenkins Sonar plugin

后端 未结 5 965
囚心锁ツ
囚心锁ツ 2021-02-05 12:49

I am trying to get code coverage with Sonar and Jenkins. I see Jenkins\' Sonar plugin successfully executes JUnit test cases and completes build successfully. But Sonar does not

5条回答
  •  无人共我
    2021-02-05 13:37

    According to this blog post, you probably forget to set the sonar.binaries property in your project properties

    Don’t forget sonar.binaries, otherwise, you might get something like « Project coverage is set to 0% since there is no directories with classes. » in your logs.

    [...]
    sonar.surefire.reportsPath=target/surefire-reports
    sonar.jacoco.reportPath=target/jacoco.exec
    sonar.binaries=target/classes
    [...]
    

提交回复
热议问题