Hi , guys, I am using the “coverlet” to generate the coverage report:
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
It generates the ‘coverage.opencover.xml’ for me.
I have the “sonar.cs.vscoveragexml.reportsPaths=**/*.opencover.xml” in the “Prepare analysis on SonarCloud” task in build pipeline.
But it throws the following errors :
2018-10-02T02:40:03.3998260Z ##[error]ERROR: Error during SonarQube Scanner execution
ERROR: Missing root element <results> in D:\a\1\.\s\ReactCore.Tests.Unit\coverage.opencover.xml at line 2
ERROR:
2018-10-02T02:40:03.4267591Z ERROR: Error during SonarQube Scanner execution
2018-10-02T02:40:03.4267971Z ERROR: Missing root element <results> in D:\a\1\.\s\ReactCore.Tests.Unit\coverage.opencover.xml at line 2
Could anyone please tell me what is the right way to get the coverage report to pass to the SonarCloud ?
Thanks