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

后端 未结 5 962
囚心锁ツ
囚心锁ツ 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:23

    Instead of using the Jenkins sonar plugin for running sonar, try to do it with maven, by executing the sonar goal. Usually this is easier then setting up an additional build step and tweaking all the paths till sonar finds all the relevant files.

    In your case I guess it can read the junit/testng report, but can't find the jacoco results (jacoco.exec). Is the path sonar outputs(../sonar/target/jacoco.exec) correct?

提交回复
热议问题