Paraunit is a tool for faster executions of PHPUnit test suites. It makes this possible by launching multiple test in parallel with single PHPUnit processes.
Paraunit is developed using Symfony components.
To use this package, use Composer:
- from CLI:
composer require --dev facile-it/paraunit
- or, directly in your
composer.json
:
{
"require-dev": {
"facile-it/paraunit": "~0.12"
}
}
If you prefer you can directly download the latest version in PHAR format, from the latest GitHub release page, starting from 0.7.3. In this case, you need to replace vendor/bin/paraunit
with ./paraunit.phar
.
All the Paraunit PHAR releases are signed with GPG. To verify the signature:
- Download the PHAR
- Download the associated GPG signature (the
.asc
file) - Use the GPG tool to verify
gpg --verify paraunit-x.y.phar.asc paraunit.phar
Paraunit starts as a Symfony console command, but it's provided through a bin launcher; you can run it like this:
(assuming your composer's bin dir is vendor/bin
)
vendor/bin/paraunit run
This command will launch all the tests in all your configured testsuites.
Paraunit is also able to collect the test coverage in parallel, like this:
vendor/bin/paraunit coverage --html=./dir
It automatically uses PHPDBG if available, and it can produce coverage in the same formats that PHPUnit provides: HTML, Clover, XML, Crap4j, PHP, text file and text to console.
For more details about Paraunit and its usage, see the documentation