error observed (wrap logs/code around triple quote ``` for proper formatting)
steps to reproduce
potential workaround
Hi Team
We are facing multiple times code coverage as 0 for all the ubuntu agents hosted on azure devops .
Parameters mentioned in the coverage are “/d:sonar.cs.vscoveragexml.reportsPaths=”*.coveragexml"
/d:sonar.cpd.exclusions="/*test.cs" "
Please check and suggest what needs to be done to get this fixed.
P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour
Ok for SonarQube analysis, but be careful, we are not in any way executing unit tests themselves, we are only relying on provided trx / coverage / coveragexml files to feed the analyzed and display number of unit tests and their coverage if applicable.
Yes this is right, but i’m very not sure about the coverage collection in linux environment. Do you have the possibility to test the whole build on a windows machine ?
Yes the whole build shows proper coverage on windows machine.
May i know the advantages in details if we think about moving to Sonar Cloud ?
If i can get a proper comparison then it will be easier for me to highlight it among the stakeholders.
@mickaelcaro i have tested one build on a windows agent and this Project shows 0 code coverage there . “2019-11-07T05:47:55.1118579Z ##[debug]set SONARQUBE_SCANNER_PARAMS={“sonar.host.url”:”/",“sonar.login”:,“sonar.projectKey”:“SspPolicyTransactionService”,“sonar.projectName”:“SspPolicyTransactionService”,“sonar.projectVersion”:“1.0”,“sonar.scanner.metadataFilePath”:“d:\a\_temp\sonar\20191107.4\dc0df743-1e3a-232a-00fd-4c35a8b983e0\report-task.txt”,"/d:sonar.cs.vscoveragexml.reportsPaths":""\.coveragexml"","/d:sonar.cpd.exclusions":""**/*test.cs""}" Are we missing some parameters at our end which shows 0 coverage.
Where is located your coveragexml path ? Given the sonar.cs.vscoveragexml.reportsPaths , it should be located under the root path (thus for better finding, please use an absolute path, with wildcards (See the doc : https://sonarcloud.io/documentation/analysis/coverage/)
it get’s published here /home/vsts/work/1/s/TestResults/Coverage/coverage.cobertura.xml
We are using Azure hosted agents here to run the Build . Please suggest if we check with some other options too.