i'm new to sonar cloud and my company implmented it in AzureDevOps Pipeline. The problem we are facing is that, to know our code coverage we have to create a pull request and build the solution in devops for the code to get analysed.
So i'm trying to do this locally, i installed SonarQube and SonarScanner and when i run the commands provided by sonarQube documentation it runs without problems, but when i check the sonarcloud page my project as 0% code coverage. I think i am missing one step in the commands i run but i am not able to find the solution.
The commands i run are:
dotnet sonarscanner begin /k:"project-key" /d:sonar.login="myToken" /o:"myOrg"
dotnet build "myPathTo .sln"
dotnet test --collect "Code Coverage" (this step creates the .coverage file in my UnitTest project)
dotnet sonarscanner end /d:sonar.login="myToken"
After the commands the page gets updated but not with code coverage
Can you guys help me with the missing step?
Thanks in advance