Importing JaCoCo XML report into SonarQube>=8.2/SonarCloud
Hi, SonarQube java analyzer team speaking,
Previously, it was possible to import coverage report using JaCoCo's native format (.exec) into SonarQube<= 8.1 and SonarCloud. But because supporting a native format is a pain, we decided since SonarQube 8.2 to only support the JaCoCo XML report format.
Some TeamCity users came back to us complaining about the impossibility to generate this JaCoCo XML report format. ( see here )
I'm not familiar with TeamCity, and reading your JaCoCo documentation I understand that you provide bundled versions of JaCoCo. But I don't see any information about the generation of JaCoCo XML report.
Using your TeamCity bundled versions of JaCoCo, is it possible to generate the XML report and how? If not, do you plan to add this feature?
Regards,
Alban
Please sign in to leave a comment.
Hi Alban,
The TeamCity JaCoCo plugin will automatically produce the XML report beginning with TeamCity 2020.1. However, the updated JaCoCo plugin is available for installations beginning with TeamCity 2019.1 and can be found in the comments here: https://youtrack.jetbrains.com/issue/TW-65441.
With the updated plugin, the XML report is published as a hidden artifact. It can be found in .teamcity/coverage_jacoco/coverage.zip!jacocoReport.xml. Hopefully, this will help SonarQube users. I am told the latest SonarQube plugin already automatically detects and uses the XML report.