0
votes

I'm testing SonarQube together with OpenCover in a .NET environment. I have a solution for a web-project, with some unit tests. I'm running NUnit through OpenCover to generate the xml-report for importing into SonarQube. I'm using the VSSonarExtension2015 to trigger the analysis on the SonarQube server, which has been configured to import the result-file from the OpenCover run. When the analysis is finished it shows the line coverage, but the condition coverage is not updated. I have run the OpenCoverReportGenerator on the same file for comparison. And the ReportGenerator shows the condition coverage, so it is included in the file from OpenCover, but not showing up in the view in SonarQube.

Im I missing something, or is it something I need to configure to show this info? coverage view

1

1 Answers

-1
votes

Condition coverage is not supported by the c# plugin.

So I have created a converter to convert opencover format into generic test data. https://github.com/jmecsoftware/OpenCover2SonarConverter

Upload with https://docs.sonarqube.org/display/SONAR/Generic+Test+Data

Be aware if you have multiple coverage files that you need to upload then condition coverage will become undefined, so I've created and dedicated plugin to cover this case https://github.com/jmecsoftware/sonarqube-testdata-plugin