...
By default, Sonar runs PHPUnit. To configure the execution of PHPUnit, you can set the following properties:
Key | Default value | Description |
|---|---|---|
| sonar.phpUnit.configuration | Read configuration from XML file. Recommended way to configure the tests that should be launched. | |
sonar.phpUnit.ignore.configuration | false | If true, PHPUnit will ignore any phpunit.xml file for launching the unit tests. |
sonar.phpUnit.mainTestClass |
| The project main test file including the relative path, ie: "/source/tests/AllTests.php". If not present, PHPUnit will look for phpunit.xml file in the test directory. |
sonar.phpUnit.filter |
| Ignore the unit tests files matching this pattern. |
sonar.phpUnit.bootstrap |
| Use this bootsrap file to initialize the unit tests. |
sonar.phpUnit.analyze.test.directory | true | If true, Sonar PHP will append test directory to PHPUnit. This will make PHPUnit look for test cases inside this directory. If several directories are defined as test directories, a phpunitRANDOM.xml file will be generated and passed to phpunit --configuration=. This generated file will contain all files inside the test directories. |
| sonar.phpUnit.group | Only runs tests from the specified group(s). | |
| sonar.phpUnit.loader | To specify which TestSuiteLoader implementation to use. |
Reusing existing reports
To reuse existing reports from PHP Depend, PHPUnit, etc.:
...

