sslavian812
(Viacheslav Shalamov)
August 21, 2019, 11:46am
1
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/github.com/.../target/scala-2.11/scoverage-report/scoverage.xml]
> [info] Statement coverage.: 41.66%
> [nfo] Branch coverage....: 32.50%
> [info] Coverage reports completed
My properties file has path to reports set up:
sonar.scala.scoverage.reportPath=target/scala-2.11/scoverage-report/scoverage.xml
(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?
sslavian812
(Viacheslav Shalamov)
August 21, 2019, 11:53am
2
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?
UPD:
I’ve seen some activity of @Alexandre_Frigout in similar posts.
Can you maybe help here?
Quentin
(Quentin Jaquier)
August 21, 2019, 3:09pm
3
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
sslavian812
(Viacheslav Shalamov)
August 23, 2019, 2:39pm
4
Hi,
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
Thank you, sonar.scala.coverage.reportPaths
helped.
1 Like