From ddd5f0594564b239a94b42009535a336ddab1b4a Mon Sep 17 00:00:00 2001 From: Denis Brumann Date: Sat, 13 Jul 2019 13:53:12 +0200 Subject: [PATCH] Adds section on parallelizing tests. --- components/phpunit_bridge.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index 3aedc75e9a2..5ebc6f8c170 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -124,6 +124,32 @@ The summary includes: +Running Tests in Parallel +------------------------- + +The modified PHPUnit script allows running tests in parallel by providing +a directory containing multiple suites with their own ``phpunit.xml.dist``. + +.. code-block:: terminal + + ├── tests + │   ├── Functional + │   │   ├── ... + │   │   └── phpunit.xml.dist + │   ├── Unit + │   │   ├── ... + │   │   └── phpunit.xml.dist + +.. code-block:: terminal + + $ ./vendor/bin/simple-phpunit tests/ + +The modified PHPUnit script will recursively go through the provided directory, +up to a depth of 3 subfolders or the value specified by the environment variable +``SYMFONY_PHPUNIT_MAX_DEPTH``, looking for ``phpunit.xml.dist`` files and then +run each suite it finds in parallel, collecting their output and display each +suites test results in their own section. + Trigger Deprecation Notices ---------------------------