User Tools



PHP

The following sections provide information on using Testspace with popular PHP test frameworks.

To push the collected result files to Testspace simply use the following client command line:

testspace static-analysis-results test-results code-coverage-results credentials@org-name.testspace.com/project-name/space-name 

where:

For more information on pushing results refer to the Collecting Data article.


Test Frameworks

PHPUnit

PHPUnit is a programmer-oriented testing framework for PHP.

Testspace accepts the JUnit XML formatted Test results. Here is an example of how to produce such:

phpunit tests --log-junit results.xml

In the Testspace client command line reference results.xml as "test-results" file.


Code Coverage Tools

PHPUnit

The PHPUnit test framework has built-in support for code coverage.

Testspace accepts the Clover XML formatted results. Here is an example of how to produce such:

phpunit tests --coverage-clover coverage.xml

In the Testspace client command line reference coverage.xml as "code-coverage-results" file.


Static Analysis Tools

PHP_CodeSniffer

PHP_CodeSniffer is a detector of a defined set of coding standards violations for PHP.

Testspace accepts Checkstyle XML formatted results. Here is an example of how to produce such:

phpcs --report=checkstyle --report-file=analysis.xml /path/to/source

In the Testspace client command line reference analysis.xml as "static-analysis-results" file.

PHPMD

PHPMD is a source code analyzer for PHP.

Testspace accepts PMD XML formatted results. Here is an example of how to produce such:

phpmd /path/to/source xml --reportfile=analysis.xml

In the Testspace client command line reference analysis.xml as "static-analysis-results" file.


Page Tools