Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No drilldown from SonarQube Unit Test Success widget

We use Jenkins to build C# project, to run unit tests (NUnit) and code coverage (NCover). As output, coverage.nccov and nunit-result.xml files.

Jenkins triggers SonarQube analysis (SonarQube 5.0.1 and up to date C# plugin). The SonarQube dashboard displays unit tests coverage and unit tests results, but list of failed tests cannot be displayed as drilldown.

widget

When user clicks on the metrics, the page displayed is quite empty (no list of files, no drilldown, just the metric).

metric detail

sonar-project.properties:

sonar.visualstudio.solution=MyProject.sln
sonar.cs.ncover3.reportsPaths=coverage.nccov
sonar.cs.nunit.reportsPaths=nunit-result.xml

Unit Tests Coverage metrics display drilldown as expected.

test coverage drilldown

like image 757
Francois Avatar asked Mar 18 '15 09:03

Francois


1 Answers

This indeed is a known limitation of the plugin, which depends on this ticket: https://jira.sonarsource.com/browse/SONARCS-657

For your information, the main difficulty to implement this feature is due to unit test reports not containing links back to the source code files, but only to assemblies/types/methods instead. SonarQube needs to know which files to show in the drilldown.

like image 103
Dinesh Bolkensteyn Avatar answered Oct 16 '22 11:10

Dinesh Bolkensteyn