sebastian/partition-phpunit-suite

A tool for creating build scripts for executing PHPUnit test suites in parallel

dev-master / 1.0.x-dev 2019-10-23 11:34 UTC

README

Latest Stable Version Build Status

partition-phpunit-suite

partition-phpunit-suite is a tool for creating build scripts for executing PHPUnit test suites in parallel.

Installation

PHP Archive (PHAR)

The easiest way to obtain partition-phpunit-suite is to download a PHP Archive (PHAR) that has all required dependencies of partition-phpunit-suite bundled in a single file:

$ wget https://phar.phpunit.de/partition-phpunit-suite.phar
$ chmod +x partition-phpunit-suite.phar
$ mv partition-phpunit-suite.phar /usr/local/bin/partition-phpunit-suite

You can also immediately use the PHAR after you have downloaded it, of course:

$ wget https://phar.phpunit.de/partition-phpunit-suite.phar
$ php partition-phpunit-suite.phar

Composer

You can add this tool as a local, per-project, development-time dependency to your project using Composer:

$ composer require --dev sebastian/partition-phpunit-suite

You can then invoke it using the vendor/bin/partition-phpunit-suite executable.

Usage

Write list of tests to temporary file

$ phpunit --list-tests-xml /tmp/tests.xml

Generate build script

build.xml (for use with Apache Ant)

$ partition-phpunit-suite --build-xml=build.xml /tmp/tests.xml

Makefile (for use with GNU make)

$ partition-phpunit-suite --makefile=Makefile /tmp/tests.xml