Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
Hi! We using SonarCube v 7.9.2 Data Center Edition
- what are you trying to achieve
My aim is to build into jenkins pipeline code coverage reports sending to server.
Our project written on C#. I created simple library containing two classes and and unit test project which covers only one of them. Test framework is xUnit. Test project uses xunit.runner.visualstudio and coverlet.collector nuget packages.
- what have you tried so far to achieve this
The problem is when execute LOCALLY script containing following commands:
`dotnet sonarscanner begin /d:sonar.cs.opencover.reportsPaths='Tests/**/coverage.opencover.xml' /d:sonar.cs.vstest.reportsPaths='Tests/**/TestResults.trx' (other params: sonar.host.url, sonar.login, /k:projKey, /n:projName, sonar.branch.name, sonar.sourceEncoding)` dotnet build dotnet test --logger "trx;LogFileName=TestResults.trx" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover dotnet sonarscanner end /d:sonar.login='myToken'
everything works fine and I see LineCoverage 50%
But when I do same thing inside jenkins pipeline I see LineCoverage 0%, Lines to cover 0