calabash/calabash-ios — pull request #236 by tonqa (2013-10-28 19:27:58+00:00)
Title: This is an extension we have applied to test multiple (physical) devices...

This is an extension we have applied to test multiple (physical) devices against each other (we only do this in iOS) in a single Calabash test. To use this technique you can add the devices via USB, then build & start the Calabash Server apps on both (all) devices and finally run the tests on your host computer via Ethernet / WiFi.

To use our extension you have to add these variables to the cucumber command:

DEVICE_ENDPOINT_1=192.168.13.1:3333
DEVICE_ENDPOINT_2=192.168.13.1:3334

And then you can extend your test by writing:

Then on device 1 do:
Then I see „No connected device"
Then on device 2 do:
Then tap „connect"
Then wait 3 seconds
Then on device 1 do:
Then I see „Device has connected"

Hint: Instead of the command line variable DEVICE_ENDPOINT_1 you can also choose a more descriptive name (e.g. „DEVICE_ENDPOINT_IPAD") and write this name then also in the test („Then on device IPAD do:").