chilio / laravel-dusk-ci

Docker Test suite for Laravel Dusk in gitlab CI
MIT License
159 stars 51 forks source link

Multiple runners at same time #77

Open HugoHeneault opened 5 months ago

HugoHeneault commented 5 months ago

Hi there,

Would it be easy to setup two or more runners to split tests?

Our CI has lots of tests and it now takes >20mn to run.

Thanks

chilio commented 4 months ago

Hi @HugoHeneault, unfortunately no. You should not even try to split your tests. Pls consider it as a bad practice.

If you have a long running scripts, consider caching elements taking long time. If your tests by itself are causing excessive time then you should review your code or your infrastructure (maybe it is just too slow)

HugoHeneault commented 3 months ago

We have a 70$ - 16 core CI runner. More than 200 tests (huge project) Each dusk test is slow (even on a macbook) and takes about 2-3s each.

We did manage to split our tests between 6 runners on the same machine and that reduced the dusk tests time by 3.

Why would it be a bad practice?