Sonar runner works fine for .NET projects in command-line, but reports missing PDBs in Jenkins -
Sonar runner works fine for .NET projects in command-line, but reports missing PDBs in Jenkins -
i'm using sonar opencover collect code coverage info of c# projects using jenkins ci system. sobar server v4.3 , runner versioned 2.3 on test machine.
the tricky part is: when run sonar runner command line of test machine (server 2008r2), works perfect opencover , collects coverage info after tests finished. example:
14:31:36.479 info - committing... 14:31:36.708 info - visited classes 53 of 114 (46.49) 14:31:36.710 info - visited methods 193 of 427 (45.2) 14:31:36.710 info - visited points 1804 of 4024 (44.83) 14:31:36.711 info - visited branches 862 of 2012 (42.84) 14:31:36.712 info -
but if set run exact same commands jenkins job, still executes tests properly, fails collect coverage info , complaining on missing pdbs or wrong profiler configuration:
15:33:00.595 info - committing... 15:33:00.879 info - no results, number of reasons. mutual reasons are: 15:33:00.879 info - 1) missing pdbs assemblies match filter please review 15:33:00.879 info - output file , refer usage guide (usage.rtf) filters. 15:33:00.879 info - 2) profiler may not registered correctly, please refer usage 15:33:00.879 info - guide , -register switch.
then code coverage reports on sonar dashboard 0%.
some of folks may experienced --- related configuration issue somewhere? checked sonarqube's site , there no such info; surf on web, , still few talked , thought might bug in sonar.
my initial thought when run commands illustration "set java_home=c:\program files\java\jre7 & c:\sonar_runner\sonar-runner-2.3\bin\sonar-runner.bat", , it's under account; , running same commands via jenkins , it's under local scheme business relationship because it's executed jenkins windows service. checking environment settings sonar-runner's outputs , seems both pretty close.
any clue on cause of missing reporting on coverage data? great :-)
it issue registration if profiler dlls.
you can manually register them using regsvr32 , drop -register switch. build servers run services , has been resolution.
alternatively assemblies under test beingness copied location (isolation?) pdbs aren't -targetdir alternative can used right that.
more info opencover can found on wiki https://github.com/opencover/opencover/wiki/usage or in supplied docs when installed (nuget/msi/zip)
.net jenkins sonarqube opencover
Comments
Post a Comment