Unit test count is not displaying for scala

Hello All,

I could see sonar test coverage is generated and displaying in sonar dashboard for scal-sbt project, However unit test count is not displaying. As per the official documentation saying need to convert test report xml into generic test data which is supported by sonar. i have tried all possible ways by using sonar.testExecutionReportPaths in sonar.properties file and resulting with below error
ERROR: Caused by: Unknown XML node, expected “testExecutions” but got “testsuite” at line 2

Please someone help me to convert generic data using sonar.testExecutionReportPaths.

also is there any necessary plugin required for scala sbt to convert generic format and display unit test count in sonar dashboard.

current version : Enterprise Edition - Version 8.9.6


Welcome to the community!

What are you using to try to do this conversion?

Also, would you mind explaining why you’d like to import this data? What benefit will you get from having it in SonarQube?



Thanks for the update!

We would like to see unit test count for scala sbt project in sonar but currently it is not displaying.
As per official documentation and Sonar application vendor team mentioned that

SonarQube does not explicitly support the import of any specific test report format for Scala, but instead supports a Generic Test Data Format that other reports can be transformed to (typically by some scripting mechanism) to be recognized by SonarQube.

the test report results .xml is not recognized by sonar and expecting to be in generic data xml format.

This is where i stuck with conversion to generic data or also is there any plugin available to convert to generic format.

I need assistance!



I’m not aware of anything to do the conversion for you. It looks like you’ll have to build this yourself.