dancryer / PHPCI

PHPCI is a free and open source continuous integration tool specifically designed for PHP.
BSD 2-Clause "Simplified" License
2.42k stars 439 forks source link

Feat/paratest plugin #1270

Closed bdanchilla closed 7 years ago

bdanchilla commented 8 years ago

Contribution Type: new plugin Link to Intent to Implement: https://github.com/Block8/PHPCI/issues/1248

This pull request affects the following areas:

In raising this pull request, I confirm the following (please check boxes):

Detailed description of change:

Plugin for paratest https://packagist.org/packages/brianium/paratest. Paratest runs PHPUnit tests in parallel, speeding up build times.

As paratest uses PHPUnit, most of the plugin is the same as the existing php_unit plugin and it extends the PhpUnit class.

A consequence of the parallel processing with paratest is that TAP results are not supported, as with the php_unit plugin. However, JUnit logging is supported and I have added parsing of it after execution to display detailed results.

This is a working first version, but will need some work to make dynamically configurable.

As is, it requires the presence of vendor/bin/paratest, the JUnit log file to be written to junit.log, the phpunit config file to be phpunit-parallel.xml and sets the number of processes to 4

ptejada commented 8 years ago

Your jUnit parser handles skipped and incomplete tests as failures. Ideally there is unittest for this cases.