TestCases are not included for Symfony 3.4 Php Project integration with Jenkins

We have a Ssymfony 3.4 PHP project and We are integrating it with Jenkins for CICD .
While integrating it For TestCase Coverage and Sonar, we have done the below configurations in sonar properties File:

sonar.php.tests.reportPath=reports/testcases_report.xml
sonar.php.coverage.reportPaths=reports/total_code_report.xml

We are creating above coverage and testcase report file through phpunit command.

Problem:

When we execute the scanner, It properly shows the coverage report but not the test cases counts and gives below error:

04:40:50.070 DEBUG: Following file is not located in the test folder specified in the Sonar configuration: /src/AcmeBundle/Test/ProductTest.php

As we know, Symfony 3.4 directory structure, we create test folder Inside the Bundle.
We have tried by adding sonar.test.inclusions = /src/AcmeBundle/Test/. But still it didn’t worked.

Please help for above issue.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *