Child pages
  • Integrating TeamCity dotCover Report with SonarQube Runner
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Assuming there is a Build Configuration (e.g. named "Tests + dotCover") building a .NET project and running tests with dotCover enabled (one or several build steps): 

Integrating with chained build

Create another Build Configuration (e.g. named "Send to SonarQube") and add 2 dependencies on initial configuration ("Tests + dotCover"):

  1. A snapshot dependency
  2. An artifact dependency for ".teamcity/.NETCoverage/dotCover.dcvr" file and getting artifacts from "Build from the same chain". 

In the new configuration ("Send to SonarQube") add a Command Line step with the following script: 

%teamcity.dotCover.home%\dotCover.exe report /ReportType=HTML /Source="dotCover.dcvr" /Output="dotCover.html"

Add SonarQube Runner to the new configuration and add additional command line argument with "-Dsonar.cs.dotcover.reportsPaths=dotCover.html"

Integrating with merging reports

After the last build step with enabled dotCover, add a new step to merge all collected coverage into a single XML in a well-known place as described here:

  • No labels