HKR
HKR

Reputation: 33

SonarQube project not Code Coverage as blank when integrated with Atlassian Bamboo

I have an Atlassian Bamboo plan referring to my C# project. The tasks configured are as follows:

a) MSBuild task to build my C# solution file. b) NUnit Runner and NUnit Parser tasks to run the Unit tests. c) OpenCover task to execute the NUnit Unit tests and generate the metrics like Lines covered, Branch coverage etc. d) SonarQube Runner task to generate the code coverage metrics on SonarQube project.

The metrics are successfully generated at step c) and results are written out to .xml file as output of OpenCover command. But after step d), SonarQube runner executes successfully and shows the results on Sonar project in terms of Number of unit tests, tests passed, tests skipped, tests failed. But the Code Coverage column shows as "-" blank.

Please note that my C# solution as multiple projects and I have the sonar-project.properties file at the root (Solution) level. I use the following Sonar-project.properties file:

sonar.projectKey=<KeyName> (Key name of  C# project in SonarQube)
sonar.projectName=<ProjectName> (Project name in SonarQube) 
sonar.projectVersion=1.0
sonar.sources=.
sonar.language=cs
sonar.cs.nunit.reportsPaths=ABC.xml(Output of Nunit task)
sonar.cs.opencover.reportsPath=XYZ.xml(Output of OpenCover task)

Please guide me in this regard, any help will be greatly appreciated.

Thanks

Upvotes: 1

Views: 1345

Answers (1)

sebbzzz
sebbzzz

Reputation: 471

Very late answer but it might help someone in the future:

You misspelled reportsPaths in your line

sonar.cs.opencover.reportsPath=XYZ.xml

Upvotes: 1

Related Questions