mercredi 5 août 2015

Jenkins PHP Unit Test and Code Coverage unable to import in SonarQube

I have been struggling with importing unit test results and code coverage from Jenkins into SonarQube. At this point, I have verified the results are being generated as they are displayed in the project's page in Jenkins.

The sonar.properties file is shown below. The php results were created with phpunit and the code coverage was created with phpunit and clover. As an effort in troubleshooting, I included both sonar.php.coverage.reportPath and sonar.clover.reportPath.

sonar.projectKey=projectKey
sonar.projectName=projectKey
sonar.projectVersion=1.0
sonar.language=php
sonar.sourceEncoding=UTF-8

sonar.php.tests.reportPath=report/phpunitresults.xml
sonar.php.coverage.reportPath=report/clover_code_coverage.xml
sonar.clover.reportPath=report/clover_code_coverage.xml 

sonar.sources=./src/
sonar.exclusions=./src/tests/**
sonar.tests=./src/tests/
sonar.coverage.exclusions=./src/tests/**/*.php

All of the results Unit Tests Coverage 0.0% Line Coverage 0.0%

The Jenkins builds do not produce any errors or helpful information in identifying a problem as to why the results are not being imported.

Can anyone help in troubleshooting the issue?

Thanks.

  • Ben

Aucun commentaire:

Enregistrer un commentaire