Search code examples
iosappiumappium-iosxcuitest

XCUITest on multiple devices


I need to automate this scenario:

  1. Do sth on 1st device (tap UI element)

  2. Verify sth on 2nd device (verify UI element)

  3. Do sth on 2nd device

  4. Verify sth on 1st device

Is this doable on XCUITest? Is it possible to sync this sequence?


Solution

  • So far its not possible with pure XCUITest:

    XCUITest tests is a UI Testing Bundle -> another iOS application, that is installed on same device and runs tests for main bundle (your application)

    So when you run tests these 2 apps (test app and main application) are installed on devices and all the execution is limited to that device.

    You still can do parallel testing (same tests on multiple devices), but no way to have one scenario manipulating with 2 devices.

    However Appium with XCode 9 supports multiple concurrent sessions, so you can write the test that:

    1. Start session 1 on 1st device and do UI actions on it
    2. Start session 2 on 2nd device and do verifications
    3. Do smth on 2nd device using session 2
    4. Verify smth on 1st device using session 1