添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hey there. I’m completely new to this topic. my sonar always showing a message

No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths=‘build/reports/jacoco/jacocoTestDebugUnitTestReport/jacocoTestDebugUnitTestReport’. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml

I can assure it, the file exist. filetree

here’s my sonar setting on top level gradle.build file

is there anything wrong with my settings?

tangopi:

No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths=‘build/reports/jacoco/jacocoTestDebugUnitTestReport/jacocoTestDebugUnitTestReport’

Doesn’t quite match what I see in your file system screenshot, which looks like:

build/reports/jacoco/jacocoTestDebugUnitTestReport/jacocoTestDebugUnitTestReport.xml

(Note the addition of .xml at the end.)

At the same time, your properties screenshot does show the ‘.xml’ at the end, in addition to “mssbase” at the beginning. It’s not clear to me whether mssbase is your project root (and so relative report paths should not include it) or a directory in your project. Given your sonar.binaries value, I guess it’s a subdirectory?

(As a side note, sonar.language had been deprecated for years, and is now no longer recognized.)

Thank you for responding.
Yes, it’s a subdirectory. my project is actually a multi module. so I include the “mssbase” path. as for “.xml” extension, i did include it. but the error message said the same. I just use an old screenshot.

No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths=‘build/reports/jacoco/jacocoTestDebugUnitTestReport/jacocoTestDebugUnitTestReport.xml

I solved it. i just added ${project.projectDir} in front of /mssbase/build/ so it will read as absolute path.

property “sonar.coverage.jacoco.xmlReportPaths”,
“${project.projectDir}/mssbase/build/and so on …”

for now, this is the solution I’m looking for.