Reputation: 147
I am using SonarQube 6.7 and TFS Plugin Sonar version 4.0.
Before the upgrade from of both the server and plugin I am able to get the coverage but now not no coverage is recorded from the MSTest. The same code with coverage is recorded when used with dot cover.
Sonar is able to record the number of tests and the coverage in TFS Build is also recorded yet it doesn't work. I have checked for the trx and the coverage files as well which is available but only *.coverage file is available not the coveragexml file. Is there any solution for this.
Upvotes: 1
Views: 3674
Reputation: 51103
Seems to be the same issue as this one-- Code Coverage report is no longer imported
Try to use the workaround provided by Evangelink :
It seems like we have a regression on the Scanner for MSBuild (ticket: https://jira.sonarsource.com/browse/SONARMSBRU-339).
While this ticket is being addressed you can fix this issue by simply adding
/d:sonar.cs.vscoveragexml.reportsPaths="**\*.coveragexml"
into the Additional Settings of the SonarQube Scanner for MSBuild - Begin Analysis (new) task.
Just as you analyzed, with this command the .coveragexml
will generated correctly and able to record the coverage.
Upvotes: 1