I'm using Codeception for testing the API endpoints of my webserver. I want to execute some stress tests so, in a Cest file called 'StressCest', I've written some tests that execute several calls to the most used endpoints of my server.
I want to launch (in parallel) a large number of multiple instances of this Cest file.
For this propose i've used Robo. I've setted A Robo configuration file (RoboFile.php) with a "parallelRun()" (https://codeception.com/docs/12-ParallelExecution) method inside.
public function parallelRun()
{
$parallel = $this->taskParallelExec();
for ($i = 1; $i <= 1000; $i++) {
$parallel->process(
$this->taskCodecept()
->suite('api')
->test('StressCest')
);
}
return $parallel->run();
}
That spawn 1000 parallel processes of StressCest. When I execute the console command robo parallel:run
this error appear:
Warning: proc_open(): unable to create pipe Too many open files in /../vendor/symfony/process/Process.php on line 337 [error] Unable to launch a new process. ERROR: proc_open(): unable to create pipe Too many open files in /../vendor/symfony/process/Process.php:337
Is there some method to bypass this error or another way to execute parallel stress test with a CestFile?
Thank you in advance for any response