Is there a way to limit the number of simulators with Xcode test plans?

59 Views Asked by At

I am trying to paralelnize my UI tests in Xcode. I have moved over to using Test Plans with "Execute in parallel" ticked.

My test setup makes use of a local node server that I set up to stub http requests and websocket messages.

When run one at a time, the tests all pass fine and are not at all flaky.

When I run in parallel, they almost all fail and it's seemingly because the node server can't serve responses quickly enough (the whole computer, an M1 Pro, gets a bit overloaded).

If, however, I select two tests to run, they run in parallel fine.

It seems essentially like my Mac can't handle 4 simulators all making requests.

I have no intention of putting this on CI (because I use screenshot testing that is flaky as hell on CI).

Does anyone know how to limit the number of simulators Xcode spins up? I've seen various answers about xcodebuild flags but I can't even get xcodebuild to work (fails to launch the simulator at all) so I'd prefer an in-Xcode solution, if anyone has one.

0

There are 0 best solutions below