Unable to push jacoco.exec to SonarQube

I am running m automated API cases against POSTMAN, using JaCoCo as a tool & pushing the test coverage report to SonarQube, but I am failed to do so for one of the services, getting below werror

***Unable to read /tmp/jacoco.exec to determine JaCoCo binary format

In one sentence, goto Administrator>Marketplace serach for sonar-jacoco plugin, install and restart. You should be able to see code coverage after you run the job.

sonar-jacoco plugin is installed already, still getting this error

Are you generating jacoco xml reports during your build - it doesn’t happen by default.

We had similar problem and solved it by deleting jacoco.exec before running the sonar scanner.

Yes we are generating jacoco.exec and then pushing this in reportsPathURl to push details on sonarqube

jacaco.exec and jacoco xml reports are two different formats @Megha_Kharbanda

1 Like