Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonarqube does not find junit reports

I am trying to publish in sonarqube the junit reports generated by phpunit. It does'nt matter the path that I put, It never finds the files. The log show this message:No PHPUnit test report provided (see 'sonar.php.tests.reportPath' property)

My configs are the following:

sonar.projectKey=MyProj
sonar.projectName=MyProj
sonar.language=php
sonar.sources=Application
sonar.tests=Tests
sonar.php.tests.reportPath=build/logs/
sonar.php.coverage.reportPath=build/coverage
like image 743
Renan Rosa Avatar asked Feb 24 '26 18:02

Renan Rosa


1 Answers

sonar.php.coverage.reportPath and sonar.php.tests.reportPath should provide xml file paths, not folder paths. For example, it could be:

sonar.php.coverage.reportPath=reports/phpunit.coverage.xml
sonar.php.tests.reportPath=reports/phpunit.xml
like image 135
Alban A. - SonarSource Team Avatar answered Feb 26 '26 07:02

Alban A. - SonarSource Team



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!