Dotcover coverage with multiple runners

Must-share information (formatted with Markdown):

  • SonarQube Developer Edition 9.6.1
    sonar-scanner-msbuild-5.5.3.43281-net5.0\SonarScanner.MSBuild.dll

Dear community,

We are running a pipeline at gitlab for a NET framework project. We use 3 different runners with 3 executors each, they can pick any job. Some test jobs can be run in parallel.

  • Build: Compile and Archive as artifacts result of compilation as pdb’s, dll’s… for later reuse at test jobs
  • Test (Unit x 7, Component x 3, Integration, System): Using dotcover command line with Nunit test runner creating dcvr coverage file for each test project
  • Sonar: Merge dcvr files coming from different test jobs and generate html coverage report, invoke sonar begin, re-compile, invoke sonar end

Our finding is that coverage is only properly gathered by Sonar when it uses the same working directory and runner that was used at build stage, otherwise it will show no coverage.

Is there anyway to overcome this limitation?

Thanks in advance.

Hello

This is mentioned in the code coverage guide under the “Not running all commands from the same folder” section.

You can read there the explanation. Running commands from the same folder is the only scenario we currently support.

To better understand your need: what is your use case, why do you consider this to be a limitation?