Not able to import open cover code coverage report from jenkins server

302 views
Skip to first unread message

Sachin Gaikwad

unread,
Nov 30, 2016, 6:43:44 AM11/30/16
to SonarQube

Not able to import the open cover code coverage file from jenkins to sonar qube.

I tried using the windows command prompt with the same commands and i am able to import the report.

facing the issue while importing from jenkins.

below are the steps followed:
::Step 1
C:\Softwares\MSBuild.SonarQube.Runner-1.1\MSBuild.SonarQube.Runner.exe begin /k:TestProject_Key /n:TestProject /v:1.0 /d:sonar.cs.opencover.it.reportsPaths="C:\ProjectWork\Alerts\IPSDataOnlyAccess\opencover.xml"

::Step 2
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "C:\ProjectWork\Alerts\IPSDataOnlyAccess\IPSDataOnlyAccess.sln" /t:rebuild

:Step 3

"C:\Softwares\opencover.4.6.519\OpenCover.Console.exe" -output:"C:\ProjectWork\Alerts\IPSDataOnlyAccess\opencover.xml" -register:path32 -target:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" -targetargs:"C:\ProjectWork\Alerts\IPSDataOnlyAccess\IPSDataOnlyAccessTest\bin\Debug\IPSDataOnlyAccessTest.dll"

Please help me to over come this issue, i am stuck here.



ijdasil...@gmail.com

unread,
Nov 30, 2016, 8:50:40 AM11/30/16
to SonarQube
Hi,

Looking at your commands, it seems that you haven't installed opencover and that you're using the uncompressed zip version.

If that is true, take a look at the Usage guide for opencover [0], section "Build system integration" and run the regsvr32 command that appears in it. That should help to fix the problem.

Hope this helps.

Greetings,
Iván

[0]: https://github.com/opencover/opencover/blob/master/main/OpenCover.Documentation/Usage.pdf

Sachin Gaikwad

unread,
Jan 10, 2017, 2:56:22 AM1/10/17
to SonarQube, ijdasil...@gmail.com
Hi,


 I tried with the solution given by you, sorry i forgot to mention that i want to import the code coverage to sonar qube from jenkins. I have observed that calculating CPD for files is 0, so is this the issue. Please help.
Thanks In advance.
Reply all
Reply to author
Forward
0 new messages