1

Is there any way to use the .xml output from a DotCover analysis when importing into SonarQube using the scanner for MSBuild?

Currently running:

  • SQ 5.4
  • C# Plugin 5.0

This is the specific SonarQube property key in question: sonar.cs.dotcover.reportsPaths

The example shown in this guide tells me that only the .html extension is accepted. Why is that? I am coming from a world where we save the report outputs in .xml and later transform it into an .html report. Is there a way to use the .xml output?

anthonymonori
  • 1,754
  • 14
  • 36
  • can you please let me know how you achieved it. I am really strugging with it since two days.. my teamcity is generating the xml using dotCover, now I cant to display that in sonarqube – harishr May 13 '16 at 09:26

1 Answers1

2

There is unfortunately no way to import the dotcover XML format. Your best bet is probably as you mentioned generate the dotcover HTML format as you mention above.

There is one alternative - I wonder if it is not more convoluted that generating the dotcover HTML format from the start - : Convert the dotcover XML files into the SonarQube Generic Test Coverage XML format and import with the Generic Test Report plugin. This is usually quite easy to do with a XSLT transformation

Olivier Korach
  • 281
  • 1
  • 4
  • Updated Generic Test Coverage XML format link: https://docs.sonarqube.org/latest/analysis/generic-test/ – jojo Dec 09 '20 at 21:27