I am using xunit for writing unit test cases for code - .NetFramework 4.7.2. I am using OpenCover to create coverage report. I am able to create the both the reports successfully
INFO: Parsing the OpenCover report c:\workspace\csh-api_feature.\Coverage.xml
INFO: Adding this code coverage report to the cache for later reuse: c:\workspace\csh-api_feature.\Coverage.xml
INFO: Sensor C# Unit Test Results Import [csharp]
INFO: Parsing the XUnit Test Results file c:\workspace\csh-api_feature.\testlog.xml
WARN: Metric ‘test_success_density’ is an internal metric computed by SonarQube. Provided value is ignored.
using below script in Jenkinsfile " withSonarQubeEnv(‘CBT’) "
dotnet sonarscanner begin /k:CSHAPI /n:“CSHAPI” /v:“1.0” /d:sonar.cs.opencover.reportsPaths=Coverage.xml /d:sonar.cs.xunit.reportsPaths=testlog.xml
But I cant see reoprts on the dash board and coverage is showing Blank
I dont have access to server so cant share info. log. But i checked if required coverage file and xunit result file are getting generated and its content which looks fine. Coverage report is providing the result:
Visited Classes 1 of 1 (100)
Visited Methods 14 of 14 (100)
Visited Points 71 of 71 (100)
Visited Branches 14 of 14 (100)
Same is the case with xunit result.