/paraunit

Run PHPUnit tests in parallel

Primary LanguagePHPApache License 2.0Apache-2.0

facile-it/paraunit

PHP Version Stable release Unstable release composer.lock

Build status Appveyor build status

Coverage Status Scrutinizer Code Climate SL Insight

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.

Installation

From Composer

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"
    }
}

PHAR

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.

Verify the GPG signature

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

Usage

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.

Documentation

For more details about Paraunit and its usage, see the documentation