Code coverage is showing as 0.0% while i can see the code bugs, vulnerabillity ,code smell issues, duplications etc

I am using SonarQube * Community Edition * Version * 8.7.1. The project is a dotnet framework webapplication wriiten in C# .

I have executed the project in azure devops with the help of yaml file.

As shown in the above picture it shows 100 percentage tests passed .

Also when i tried running it in visual studio ,its shows all of my 10 test cases have passed ( Unit test is done in VStest). Yet code coverage is showing as 0.0%, but it is showing all other things like code bugs, vulnerabilities and code smell issues.

Any suggestions on how to solve this problem ?

Hi @james_prakash ,

Welcome to SonarSource community! :sonarsource:

Please check these 2 community guides and review them to see if this matches your problem:

If those do not help you, please take a look at my example pipeline yaml file for Azure DevOps that imports VSTests and coverage correctly:

azure-pipelines.yml

It’s for SonarCloud, but it’s similar for SonarQube.

If all that fails, please add sonar.verbose=true to the extraProperties key in SonarQubePrepare task with Azure pipelines yaml and share the logs here.

Joe