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

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

    I read https://docs.sonarqube.org/display/PLUG/Code+Coverage+by+Unit+Tests+for+Java+Project and used cobertura as my code coverage plugin then I see code coverage displays for small projects. When I check for a big project in sonar I just see code coverage as - that means its empty. In logs I could find that Cobertura report was not found at /.../coverage.xml path.

    coverage.xml was not generated due to OutOfMemeryError:heapspace. Since my project is such a big project when I set heap memory to 2GB and cobertura plugin memory to 1.5GB sonar gets code coverage displayed.

提交回复
热议问题