Running tests on multiple simulators and local mock servers

Hello, I have a question about running tests on multiple simulators.

Currently, my company has a WDIO+Appium test suite with XCUITEST driver that runs on a single simulator through a mockttp proxy (we are intercepting and mocking some of the responses from our APIs and pass through the rest). In order to route the traffic we are currently using 'networksetup -setsecurewebproxy <adapter> <host> <port>'. Everything works as expected.

With growing number of tests we'd like to scale number of simulators on a single host to 3-5. We have a working setup but the problem are system-wide proxy settings routing traffic from multiple simulators, which we can't distinguish by UDID or any other means, we know of. We can spin multiple mock servers on the same machine but we are struggling to find the way to route the traffic on a simulator basis.

In the end, both options are viable:

  • 1 mock server running for multiple simulators
  • N number of mock servers for N number of simulators

Has anyone had the same/similar problem? How to approach this? We are currently running on Sequoia OSX and platform version 18.6. Thanks!

Running tests on multiple simulators and local mock servers
 
 
Q