Backdoor concept in Appium (like in Calabash)

(I originally posted this Q on http://stackoverflow.com/questions/30705557/backdoor-concept-in-appium-like-in-calabash-for-ui-testing.)

In Calabash you can implement a backdoor, i.e., a way to call a method in the app delegate during test case execution. This makes it possible to simulate non-UI/external events like a Bluetooth device to appear/disappear, etc. in simulator.

(I understand the backdoor concept is possible because Calabash-server is linked into the executable. Appium executes tests on the an untouched executable.)

Is a similar concept available in Appium? If not what are the alternatives then?

(I couldn’t find anything in the Appium documentation.)

1 Like

I think what you may need is this:
https://developer.apple.com/library/ios/documentation/UIAutomation/Reference/UIAHostClassReference/#//apple_ref/javascript/instm/UIAHost/performTaskWithPathArgumentsTimeout
you should be able to wrap this inside an execute_script command.

While you cannot call methods directly in your app under test with appium, you can use execute_script to issue various commands to shape your network, for example.
good luck!