SonarCloud fails to import code coverage for Scala

Cloud Sonar does not import code coverage report

  • SonarCloud (SonarQube 7.9 I believe)
  • I have coverage report generated, but sonar does not import it.

I have a Scala project, I run tests and generate coverage reports using scoverage:

sbt clean coverage test
sbt coverageReport
> [info] Written XML coverage report [/drone/src/]
> [info] Statement coverage.: 41.66%
> [nfo] Branch coverage....: 32.50%
> [info] Coverage reports completed

My properties file has path to reports set up:


(tried sonar.scala.coverage. as well, same result).

But aster sonar-scan runs, I don’t see my coverage report imported:

Why is it not imported?

Noticed strange line in debug logs:

‘Scoverage sensor for Scala coverage’ skipped because one of the required properties is missing

What is it complaining about?

Moreover, If I use community version of Sonar Qube and run it locally, it imports coverage reports as well as scapegoat reports properly, and my dashboard fo the same project looks like that:

Why anyone use cloud (paid) version of sonar then?

I’ve seen some activity of @Alexandre_Frigout in similar posts.
Can you maybe help here?

Hello @sslavian812,

Can you confirm that your properties file contains exactly sonar.scala.scoverage.reportPath? Can you remember where did you find this key?

In the documentation, the key stated for the report paths is sonar.scala.coverage.reportPaths, can you try with this one?

1 Like

I found example of key here (I tried local version first, and it seems to be the only one working with Scala):

Thought that key is the same for all sonar versions/projects, but apparently not :frowning:

Thank you, sonar.scala.coverage.reportPaths helped.

1 Like