Sonarqube is not showing code coverage after running

前端 未结 3 1597
梦如初夏
梦如初夏 2021-02-19 02:29

I\'m running sonarqube with maven.

I have installed it using following way. Using brew, I installed mysql and sonar.

When

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-19 03:15

    I had same problem, I will help you to resolve that. Here 1st thing is to walk through your pom file.

    
        UTF-8
        1.8
        0.8.5
        target/jacoco-ut.exec
        target/jacoco-it.exec
    
    

    In pom file, you used jacoco-ut.exec you have to use below properties on your execute SonarQube Scanner in Jenkins

    sonar.java.binaries=target/classes
    sonar.junit.reportsPath=target/surefire-reports
    sonar.surefire.reportsPath=target/surefire-reports
    sonar.jacoco.reportPath=target/jacoco-ut.exec
    

    Keep in your mind about jacoco.exec in pom and property name of executing SonarQube Scanner in Jenkins

提交回复
热议问题