I have a Azure DevOps pipeline that runs some unit tests on a .NET 6 code base.
In the DevOps pipeline the results of the unit tests are shown and I also see a coverage report in DevOps.
Issues in code are properly reported to SonarQube.
But the coverage result from the unit test does not show up in SonarQube.
It’s not clear to me what your coverage engine is. Visual Studio? If so, there’s no need for that coverage.cobertura.xml file. The docs should help.
please give us the verbose output of the scanner commands (please run SonarScanner.MSBuild.exe begin /k:“MyProject” /d:sonar.verbose=true as the begin step, and please attach the output of the BEGIN and END steps)
please give the output of running MSBuild in verbose mode (/v:d)
According to the logs I’m using the following versions:
SonarQube: 5.18.4
SonarScanner for MSBuild: 5.15
MSBuild: Not sure which version is used hare.
Yes that is correct.
I adjusted this part to be 100% in line with the config you suggest this morning.
Unfortunately this did not solve the issue → coverage is still not showing up in SonarQube.
Thanks for the debug log. Finally, we have something relevant. A whole bunch of lines line this:
'VisualStudioCoverage' skipped because there is no related file in current project
I’m guessing that if you went back to the debug begin step log, you would see each of your projects in turn being classified as test projects. This should help sort that out.
Unfortunately I still do not see coverage info in SonarQube
In the logs it still says it skiped converage:
2023-12-05T06:32:06.3164889Z 06:32:06.316 INFO: ------------- Run sensors on module XXXXX_Activities_Test
2023-12-05T06:32:06.3181049Z 06:32:06.317 INFO: Configuring Mule Plugin...
2023-12-05T06:32:06.5772884Z 06:32:06.574 DEBUG: 'JavaSensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5782592Z 06:32:06.574 DEBUG: 'CobolSquidSensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5784026Z 06:32:06.574 DEBUG: 'Import external issues report' skipped because one of the required properties is missing
2023-12-05T06:32:06.5785809Z 06:32:06.574 DEBUG: 'Import external issues report from SARIF file.' skipped because one of the required properties is missing
2023-12-05T06:32:06.5787139Z 06:32:06.574 INFO: [mule4] Checking if mule4 coverage sensor is applicable for current language...
2023-12-05T06:32:06.5788925Z 06:32:06.574 DEBUG: 'com.zurich.c4e.sonarqube.mule.extensions.MuleCoverageSensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5790379Z 06:32:06.574 DEBUG: 'PmdSensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5791822Z 06:32:06.574 DEBUG: 'IaC Terraform Sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5793560Z 06:32:06.574 DEBUG: 'IaC CloudFormation Sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5795073Z 06:32:06.574 DEBUG: 'IaC Kubernetes Sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5796679Z 06:32:06.574 DEBUG: 'PL/SQL Sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5798174Z 06:32:06.574 DEBUG: 'Scala Sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5800158Z 06:32:06.575 DEBUG: 'Scoverage sensor for Scala coverage' skipped because there is no related file in current project
2023-12-05T06:32:06.5802404Z 06:32:06.575 DEBUG: 'Import of Scalastyle issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5803639Z 06:32:06.575 DEBUG: 'Import of Scapegoat issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5804895Z 06:32:06.575 DEBUG: 'Import of Checkstyle issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5805974Z 06:32:06.575 DEBUG: 'Import of PMD issues' skipped because one of the required properties is missing
2023-12-05T06:32:06.5807049Z 06:32:06.575 DEBUG: 'Import of SpotBugs issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5808096Z 06:32:06.575 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5809156Z 06:32:06.575 DEBUG: 'Removed properties sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5810134Z 06:32:06.575 DEBUG: 'HTML' skipped because there is no related file in current project
2023-12-05T06:32:06.5810996Z 06:32:06.575 DEBUG: 'Flex' skipped because there is no related file in current project
2023-12-05T06:32:06.5811924Z 06:32:06.575 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
2023-12-05T06:32:06.5812867Z 06:32:06.575 DEBUG: 'XML Sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5813850Z 06:32:06.575 DEBUG: 'CheckstyleSensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5814953Z 06:32:06.575 DEBUG: 'Swift Code Quality and Security' skipped because there is no related file in current project
2023-12-05T06:32:06.5816291Z 06:32:06.575 DEBUG: 'Import of SwiftLint issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5817292Z 06:32:06.575 DEBUG: 'gcov' skipped because there is no related file in current project
2023-12-05T06:32:06.5818182Z 06:32:06.575 DEBUG: 'llvm-cov' skipped because there is no related file in current project
2023-12-05T06:32:06.5819090Z 06:32:06.575 DEBUG: 'cppunit' skipped because there is no related file in current project
2023-12-05T06:32:06.5820063Z 06:32:06.575 DEBUG: 'VisualStudioCoverage' skipped because there is no related file in current project
2023-12-05T06:32:06.5821053Z 06:32:06.575 DEBUG: 'bullseye' skipped because there is no related file in current project
2023-12-05T06:32:06.5822002Z 06:32:06.575 DEBUG: 'Python Sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5823127Z 06:32:06.575 DEBUG: 'Cobertura Sensor for Python coverage' skipped because there is no related file in current project
2023-12-05T06:32:06.5824268Z 06:32:06.575 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5825328Z 06:32:06.575 DEBUG: 'Import of Pylint issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5826413Z 06:32:06.575 DEBUG: 'Import of Bandit issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5827503Z 06:32:06.575 DEBUG: 'Import of Flake8 issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5834366Z 06:32:06.577 DEBUG: 'Code Quality and Security for Go' skipped because there is no related file in current project
2023-12-05T06:32:06.5835530Z 06:32:06.577 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project
2023-12-05T06:32:06.5836825Z 06:32:06.577 DEBUG: 'Go Cover sensor for Go coverage' skipped because one of the required properties is missing
2023-12-05T06:32:06.5837934Z 06:32:06.577 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5839027Z 06:32:06.577 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5840157Z 06:32:06.577 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5841329Z 06:32:06.577 DEBUG: 'Import of GolangCI-Lint issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5842402Z 06:32:06.577 DEBUG: 'Kotlin Sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5843416Z 06:32:06.577 DEBUG: 'KotlinSurefireSensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5844579Z 06:32:06.577 DEBUG: 'Import of detekt issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5845693Z 06:32:06.577 DEBUG: 'Import of Android Lint issues' skipped because one of the required properties is missing
2023-12-05T06:32:06.5846793Z 06:32:06.577 DEBUG: 'Import of ktlint issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5847802Z 06:32:06.578 DEBUG: 'RPG sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5848765Z 06:32:06.578 DEBUG: 'PliSquidSensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5849740Z 06:32:06.578 DEBUG: 'T-SQL Sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5850707Z 06:32:06.578 DEBUG: 'VbSquidSensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5851668Z 06:32:06.578 DEBUG: 'Apex Sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5852735Z 06:32:06.578 DEBUG: 'Test coverage Sensor for Apex' skipped because there is no related file in current project
2023-12-05T06:32:06.5853834Z 06:32:06.578 DEBUG: 'Import of PMD issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5854889Z 06:32:06.578 DEBUG: 'JavaScript analysis' skipped because there is no related file in current project
2023-12-05T06:32:06.5856070Z 06:32:06.578 DEBUG: 'TypeScript analysis' skipped because there is no related file in current project
2023-12-05T06:32:06.5857204Z 06:32:06.578 DEBUG: 'JavaScript inside YAML analysis' skipped because there is no related file in current project
2023-12-05T06:32:06.5858403Z 06:32:06.578 DEBUG: 'JavaScript/TypeScript Coverage' skipped because there is no related file in current project
2023-12-05T06:32:06.5859524Z 06:32:06.578 DEBUG: 'Import of ESLint issues' skipped because one of the required properties is missing
2023-12-05T06:32:06.5860585Z 06:32:06.578 DEBUG: 'Import of TSLint issues' skipped because one of the required properties is missing
2023-12-05T06:32:06.5861585Z 06:32:06.578 DEBUG: 'CSS Metrics' skipped because there is no related file in current project
2023-12-05T06:32:06.5862618Z 06:32:06.578 DEBUG: 'Import of stylelint issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5863651Z 06:32:06.578 DEBUG: 'Ruby Sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5864686Z 06:32:06.578 DEBUG: 'Import of RuboCop issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5865862Z 06:32:06.578 DEBUG: 'SimpleCov Sensor for Ruby coverage' skipped because there is no related file in current project
2023-12-05T06:32:06.5866971Z 06:32:06.578 DEBUG: 'FindBugs Sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5867939Z 06:32:06.578 DEBUG: 'Dart sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5868941Z 06:32:06.578 DEBUG: 'dartanalyzer sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5870058Z 06:32:06.578 DEBUG: 'Flutter unit tests' skipped because there is no related file in current project
2023-12-05T06:32:06.5871061Z 06:32:06.578 DEBUG: 'Flutter Coverage' skipped because there is no related file in current project
2023-12-05T06:32:06.5872123Z 06:32:06.578 DEBUG: 'LintR Sensor for R files' skipped because there is no related file in current project
2023-12-05T06:32:06.5873149Z 06:32:06.578 DEBUG: 'GroovySensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5874083Z 06:32:06.578 DEBUG: 'CodeNarc' skipped because there is no related file in current project
2023-12-05T06:32:06.5875077Z 06:32:06.578 DEBUG: 'GroovySurefireSensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5876150Z 06:32:06.578 DEBUG: 'Groovy CoberturaSensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5877297Z 06:32:06.578 DEBUG: 'Groovy JaCoCo Coverage' skipped because there is no related file in current project
2023-12-05T06:32:06.5878442Z 06:32:06.578 DEBUG: 'Python HTML templates processing' skipped because there is no related file in current project
2023-12-05T06:32:06.5879489Z 06:32:06.578 DEBUG: 'PHP sensor' skipped because there is no related file in current project
2023-12-05T06:32:06.5880537Z 06:32:06.578 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
2023-12-05T06:32:06.5881659Z 06:32:06.578 DEBUG: 'Import of PHPStan issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5882754Z 06:32:06.578 DEBUG: 'Import of Psalm issues' skipped because there is no related file in current project
2023-12-05T06:32:06.5883816Z 06:32:06.578 DEBUG: 'Executes gwb inspect' skipped because there is no related file in current project
2023-12-05T06:32:06.5884851Z 06:32:06.578 DEBUG: 'AbapSquidSensor' skipped because there is no related file in current project