OpenCover reports and xunit testcase reports are not getting uploaded to the server

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

Hi @amitechno,

Could you share the verbose output of the end step please? (you can generate verbose output by specifying /d:sonar.verbose=true in the begin step)

Also:

  • does the file c:\workspace\csh-api_feature.\Coverage.xml exist?
  • …and does it contain the data you expect? i.e. does it have coverage information relating to your product projects?
  • could you share the contents of the .sonarqube\out\ProjectInfo.log?

Thanks

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.

Unfortunately there’s not enough information to diagnose the issue. Could you provide the detailed console output for the analysis step then?

To get the detailed output, specify /d:sonar.verbose=true in the begin step.

Also, which build system are you using?