Test coverage reporting 0 new lines

Hi all,

We’re seeing zero new lines being reported for our test coverage. I think this metric is used to compare the current build to the previous, but our builds have reported 0% coverage and 0 new lines since the very beginning when obviously there have been a lot of changes to the code and running test with coverage locally puts out a much higher percentage.

The codebase is a combination of Java and Kotlin, we’re using sonarcube version 3.3.

If you need any more information, or if you can point me in the right direction I’f be grateful.

Thanks

Hi,

Welcome to the community!

Is your SonarQube version really 3.3? If so… Normally I’d suggest an upgrade path, but 3.3 was released over a decade ago. You probably want to start over with the current version: 9.4.

You’ll find that… almost everything has changed since 3.3. One thing that stays the same, though, is that to get coverage shown in SonarQube you need to make sure you’re uploading a coverage report. Once you get onto a modern version, the docs should help you do that.

 
HTH,
Ann

Hi, thanks for the response! Apologies, that was a slight typo - I meant to say we’re using sonarqube *gradle plugin version 3.3, which I believe is the latest version

Hi,

And what’s your SonarQube version?

But either way, this part doesn’t change:

 
Ann

Apologies for the delay.

We’re just using the Gradle plugin and the Sonarcloud web portal, I’m not sure where I would get any other SonarQube version. We’re definitely uploading a coverage report using Jacoco

Hi,

Which is why you put this in the SonarCloud category. :flushed:

Can you show your analysis logs so we can see how/whether that report is being read?

 
Ann

I’d be happy to, could you advise on where to find the analysis logs? I can’t see anywhere to download them on the portal

Hi,

What I’m looking for is the output to the console from the analysis command.

 
Ann

Ah right, let me know if this isn’t what you’re after:

> Task :sonarqube

Access to the multi-values/property set property 'sonar.java.binaries' should be made using 'getStringArray' method. The SonarQube plugin using this property should be updated.

Access to the multi-values/property set property 'sonar.java.libraries' should be made using 'getStringArray' method. The SonarQube plugin using this property should be updated.

Unable to import detekt report file(s):

- /Users/user/project/app/./build/reports/detekt-report.xml

The report file(s) can not be found. Check that the property 'sonar.kotlin.detekt.reportPaths' is correctly configured.

Unable to import Android Lint report file(s):

- /Users/user/project/app/./build/reports/lint-results-uatWithoutPinningDebug.xml

The report file(s) can not be found. Check that the property 'sonar.androidLint.reportPaths' is correctly configured.

Hi,

This isn’t the full analysis log. Could you re-run with ./gradlew --debug and post here what you get in terms of output?

 
Ann