Laravel - Getting Started - Running Tests In Parallel

By default, Laravel and PHPUnit execute your tests sequentially within a single process. However, you may greatly reduce the amount of time it takes to run your tests by running tests simultaneously across multiple processes. To get started, ensure your application depends on version ^5.3 or greater of the nunomaduro/collision package. Then, include the --parallel option when executing the test Artisan command:

    php artisan test --parallel

By default, Laravel will create as many processes as there are available CPU cores on your machine. However, you may adjust the number of processes using the --processes option:

    php artisan test --parallel --processes=4
When running tests in parallel, some PHPUnit options (such as --do-not-cache-result) may not be available.