How to help SonarQube display covering tests

dotnet

(Michael J Vinca) #1

SonarQube * Developer Edition * Version 7.2 (build 13530)
SonarQube shows me a dialog when I click on Code Coverage glyphs
image

I’m curious how I can feed information into SonarQube to help it know what tests are covering these lines of code, as it currently doesn’t seem to have that information. We are using dotCover for coverage. Our build process (combining some stages together) follows the logic below to give the coverage to SonarQube:

dotnet c:\BuildAgent\tools\sonar-scanner\SonarScanner.MSBuild.dll begin /k:"REDACTED_NAME" /d:sonar.host.url="http://REDACTED_SERVER:9000" /d:sonar.login="REDACTED_LOGIN_KEY" /d:sonar.branch.name="%teamcity.build.branch%" /d:sonar.cs.dotcover.reportsPaths="REDACTED_NAME.html"
dotnet build REDACTED_NAME.sln --configuration REDACTED_CONFIG
%teamcity.tool.dotCover%\dotCover.exe report /Source=dotCover.dcvr /Output=REDACTED_NAME.html /ReportType=HTML
dotnet c:\BuildAgent\tools\sonar-scanner\SonarScanner.MSBuild.dll end /d:sonar.login="REDACTED_LOGIN_KEY"

(Colin Mueller) #2

Hey Michael,

Check out my answer here:

Colin


(Michael J Vinca) #3

Ah, that’s a shame. It would be a really useful feature… we have so many tests, having a central place to know what I need to look at when tweaking code would be great, before running all the tests and getting a new report. Do you know if there is a feature request anywhere?