Can not get code coverage report

I want to import code coverage xml report to my SonarQube analysis results.
I have created simple jenkins pipline. I have implemented sonar.cs.opencover.reportsPaths property inside file for sonar-scanner-msbuild. But there was no code coverage result.
You can see my simple piplene image below.

When i implement it as windows batch command like image below it work fine.
I can get code coverage report.

Why there is no code coverage report when i implement my jenkins as first option.

Thank you in advance.

SonarQube: 7.3 and 7.4

You need to implement your code coverage analysis parameters into the “Additional Analysis” section of your SonarScanner for MSBuild - Begin Analysis step.

1 Like

I agree with @Colin that it is better to specify project- or build-specific values of the sonar.cs.opencover.reportsPaths property in the Additional Arguments text box, but if you want, you could set global value of the sonar.cs.opencover.reportsPaths property in the SonarQube.Analysis.xml file that’s located in the same directory where you installed Scanner for MSBuild (next to the SonarQube.Scanner.MSBuild.exe). is taken into account only when you use the Scanner CLI to analyze non-.NET projects.


Thank you very much both of you :hugs:

1 Like