Search code examples
xcode7xcode-ui-testing

Parallel testing with UI Testing Xcode


Can I open multiple simulator on the same mac in order to do parallel testing using UI Testing from Xcode?


Solution

  • Update May 2018:

    Bluepill allows tests to be split across multiple simulators and supports XCUITests:

    we recently added support for Xcode UI Testing bundles. Thanks to the inspiration from FBSimulatorControl. Bluepill now supports Xcode unit test bundle and UI test bundles.


    Original answer:

    There doesn't seem to be a viable solution at the moment. However promising tools are coming into place. There's a framework called FBSimulatorControl and it's cli tool called fbsimctl which allows you to boot multiple simulators at once, and install & run apps.

    With fbsimctl you could build you target application & install it on each simulator. The part I'm stuck on is how to build & install the companion XCTestUI runner app.

    xcodebuild doesn't appear to allow building the XCTestUI runner app without invoking the test action (causing alerts that multiple simulators are open). If xcodebuild could allow the building the .app/.ipa for the runner app only, then it looks like fbsimctl could handle the rest.

    There's also an open issue over at facebook/xctool trying to work through this problem.