Hi there,
I new with sonarqube, and im praticing some Demo Poc locally, using sonarqube community ruiing in Docker.
The problem here is, sonarqube It’s not detecting my unit test. In ReportGenerator show normally as i show in the print bellow.
These are the commands that i`ve used.
1 - dotnet sonarscanner begin /k:“DemoArchApi” /d:sonar.token=“”
2- /d:sonar.cs.vscoveragexml.reportsPaths=<project.test_dir>\TestResults*.coveragexml
3- dotnet test CleanArchIntegrantion.API.Test.csproj --collect:“Code Coverage”
4- dotnet build
4- dotnet sonarscanner end /d:sonar.token=“”
Sorry to insist on the naming, but I also see that the template for the file is *.coveragexml.
Is this another typo? I do not think this is the correct pattern for coverage files generated by dotnet test --collect.
im my project i run the folow command, and then is generated a folder with a .coverage file extension : \TestResults\d1099ac8-0f75-49c7-ad72-359f40d58984
dotnet test CleanArchIntegrantion.API.Test.csproj --collect:“Code Coverage”
If that is so, then the scanner expects to find .coverage.xml files in the directory, which would explain why we do not find any and thus report no coverage.
thx, but i really dont know what happend.
i already try specify the correct file or extension.
\TestResults\61079ea3-e7b7-4292-a968-95df910ec028\coverage.cobertura.xml then =>
dotnet sonarscanner begin /k:“DemoArchApi” /d:sonar.token=“sqp_82eef9f7d66e790e4d77362b7c8ac6c6c3dc8bcb” /d:sonar.host.url=“http://localhost:9000” /d:sonar.cs.vscoveragexml.reportsPaths=.\TestResults\f944bf47-4a3b-495b-a14c-82cb233dd961\coverage.cobertura.xml