JaCoco Kotlin coverage report

Hi all,

I already tried to send Kotlin Code Coverage (https://jira.sonarsource.com/browse/MMF-1362), but it didnt show up on Sonarqube, it shows 0% coverage. I already set the xml.enabled to true and make sure the xml file is there.

This is how the property looks on my project:
property “sonar.coverage.jacoco.xmlReportPaths”, “build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml”

There is no problem with Java coverage. I use Kotlin + Java in my Android project.

Did I do anything wrong with the script? Any help is appreciated.
I use sonarqube Version 7.1 (build 11001) on docker

Thank you.

Hello Jaka,

It’s not yet possible to use the property “sonar.coverage.jacoco.xmlReportPaths” because the related feature is not yet released.
This should come around the 15th of October. This will be an extra plugin to install on your SonarQube 7.1.
It will come out of the box with SonarQube 7.4

Regards

Hi Alexandre,

Noted. Thank you for the confirmation. Will wait until the plugin released.

Regards,

Hi Alexandre,

I saw the documentation for this feature, so I assume it’s released already? If so, which plugin I have to install to enable the feature? I cant find it.

Regards

Hello,

You need to install SonarJaCoCo 1.0.1 on your SonarQube instance.

The documentation is containing the link to download it: https://docs.sonarqube.org/display/PLUG/Kotlin+Coverage+Results+Import

Regards

1 Like