2

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?

Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63
Pawel Bala
  • 93
  • 9
  • As far as I know Appium (which uses XCUITest) somehow is capable of multi device session. How about pure XCUITest? – Pawel Bala Jun 04 '18 at 16:31

1 Answers1

1

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
dmle
  • 3,498
  • 1
  • 14
  • 22
  • I know that appium is capable of doing that - but my limitation is that it has to be swift.My boss is very stubbborn :/ so far I figured this - https://stackoverflow.com/questions/48552810/xcuitest-running-tests-across-two-apps-in-a-coordinated-fashion Is it possible to compile+test the same app (on 2 different simulators?) – Pawel Bala Jun 18 '18 at 17:38