Description
What are you trying to achieve?
I'd like to be able to use CodeceptJS to run tests on multiple machines in a CI environment without needing to use grep
or manually pick which tests run on which machines. You can read more about this in a few other test runners such as Playwright and Codeception .
So if we had 100 tests, and I split into groups of 4, then tell one machine to execute group 1, it should execute 25 tests. One method of determining which test are part of which groups are simply running every 4th test.
We can then use the matrix
strategy in Github Actions to execute each shard on a different machine in parallel.
I've spent some time researching and developing a solution that could make this work. Essentially, we would need to update Mocha to support this and then forward through the option from CodeceptJS. I've proposed the feature be added to Mocha (mochajs/mocha#4958) and we would need to wait for them to consider adding the feature before we could do it here.
I would be responsible for building out the feature should we decide this would be a good addition to CodeceptJS.
It is possible that Codecept implements this feature themselves without using Mocha so I wouldn't mind having a conversation about that.
Thank you for your consideration!