Multiple devices on Calabash

2,155 views
Skip to first unread message

Mashhood Rastgar

unread,
Oct 8, 2013, 2:54:35 AM10/8/13
to calaba...@googlegroups.com
Hi,

I am trying to execute calabash-ios on multiple devices, however the second device doesnt start if I launch them together (using a bash script). I also tried launching them a short lag, but that did not help either. Is it possible to run multiple devices (I have 4) on calabash-ios in parallel? The wiki for physical devices (https://github.com/calabash/calabash-ios/wiki/07-Testing-on-physical-iDevices) does not mention it.

This is the command I am using currently:
DEVICE_ENDPOINT=http:\\192.168.0.137:37265 BUNDLE_ID=com.sampleApp.Text DEVICE_TARGET=85760129ed53775229ec43c006bf2e49d103528f cucumber

Thanks.

Joshua Moody

unread,
Oct 8, 2013, 10:38:56 AM10/8/13
to calaba...@googlegroups.com
i am often testing with multiple devices connected and running.

the problem is that there can only be one instance of the app running with Instruments.

so if you are launching your app with Instruments, you can only test on one device at a time.

Mashhood Rastgar

unread,
Oct 8, 2013, 12:10:26 PM10/8/13
to calaba...@googlegroups.com
Hi Joshua,

Thanks for the heads up. Do you know of any way to launching the app in parallel without Instruments? I was using GDB before, but that doesnt work with iOS7 anymore..  :( and LLDB also didn't work with multiple devices either (at least for the implementation I used)..

Anyway I will stick to my series implementation until I can find an alternative... Thanks again!

Stewart Gleadow

unread,
Oct 8, 2013, 4:47:11 PM10/8/13
to calaba...@googlegroups.com
I haven't been able to solve the issue of multiple test runs in parallel on a single machine. These days I just have a VM set up with all the tools I need on it (Xcode, RVM etc), and then just extra copies of the VM running builds in parallel. It's a bit more set up initially, but it's working well now, particularly as we have some running Xcode 4 and some Xcode 5. (you want a machine with a bit of grunt though… when is the new Mac Pro getting released again?).

- Stew


--
You received this message because you are subscribed to the Google Groups "calabash-ios" group.
To unsubscribe from this group and stop receiving emails from it, send an email to calabash-ios...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Mashhood Rastgar

unread,
Oct 8, 2013, 11:52:16 PM10/8/13
to calaba...@googlegroups.com
Hmmm, interesting. Looks like some work to setup, but should def be worth a shot. Will look into this. Thanks!

Greg Jaskiewicz

unread,
Nov 29, 2013, 5:39:47 AM11/29/13
to calaba...@googlegroups.com
Rubbish. 

I can run two at the same time. One is running out of Teamcity, and second one can be fired manually on the command line. 
However, as soon as you put them together in the bash script - they stutter. 
It is a calabash issue, or at least bash+calabash, not instruments limitations. 
Both Xcode and instruments allow you to run multiple instances of tests on many devices simultaneously .

Krukow

unread,
Nov 29, 2013, 2:28:26 PM11/29/13
to calaba...@googlegroups.com

On Friday, November 29, 2013 11:39:47 AM UTC+1, Greg Jaskiewicz wrote:
Rubbish. 

I can run two at the same time. One is running out of Teamcity, and second one can be fired manually on the command line. 
However, as soon as you put them together in the bash script - they stutter. 
It is a calabash issue, or at least bash+calabash, not instruments limitations. 
Both Xcode and instruments allow you to run multiple instances of tests on many devices simultaneously .

It's not 'Rubbish', and I'd prefer if we keep a good tone on these forums. 

Last I checked, instruments did not support running two UIAutomation tests on the same host. So if what you say is correct it is something that changed recently.


ol...@eventsoft.com.ua

unread,
Jan 29, 2015, 3:26:30 AM1/29/15
to calaba...@googlegroups.com
Please tell me what is the situation now with the launch of Calabash tests on multiple devices connected to the Mac OS. I need to run tests simultaneously on all devices which are connected.


пятница, 29 ноября 2013 г., 21:28:26 UTC+2 пользователь Krukow написал:

Joshua Moody

unread,
Feb 4, 2015, 4:22:50 PM2/4/15
to calaba...@googlegroups.com
This is not possible because Apple restricts the number of active instruments processes to 1.

Andrew B

unread,
Jun 24, 2015, 4:51:13 PM6/24/15
to calaba...@googlegroups.com
Hey Joshua - You mentioned that you are "often testing with multiple devices connected and running." If you aren't using instruments because you can only have one instruments process running at a time, how are you doing this?

Joshua Moody

unread,
Jun 25, 2015, 8:13:14 AM6/25/15
to calaba...@googlegroups.com, abard...@gmail.com
This is why I really dislike Google Groups - you cannot delete or edit answers.

Back in 2013, it was possible to test on multiple devices at once because we did not rely on Apple's instruments.

Starting in iOS 7, Apple dropped the record/playback API which forced us to adopt instruments.

I am limited, just like everyone else, to 1 active instruments process.

Shawn Edge

unread,
Aug 12, 2015, 3:20:42 PM8/12/15
to calabash-ios, abard...@gmail.com
Hi Josh, 

I've been poking a bit over at the Appium forums and people have mentioned that with the latest Xcode release 6.4 this is no longer an issue is this true ?

- Shawn

Stefan Renne

unread,
Aug 17, 2015, 10:10:52 AM8/17/15
to calabash-ios
It is possible, but it requires some effort.

We have a setup available where all phone's are started in there own mac VM
And we have created an abstraction layer that route's query's and tap's using ssh to the specific phone's using a sort of persona idea within steps.
When David touches the x button
When Monica touches the x button

So David and Monica are then actually Physical phones being started in there own VM's.


Stefan


Op dinsdag 8 oktober 2013 08:54:35 UTC+2 schreef Mashhood Rastgar:

Joshua Moody

unread,
Aug 18, 2015, 4:20:31 AM8/18/15
to calabash-ios
As far as I know the, Xcode 6.4 still enforces the 1 active instruments
process rule. You can start another, but the IO of one will clobber the
other.

Shawn Edge

unread,
Aug 24, 2015, 10:24:14 AM8/24/15
to calabash-ios
Gotcha... Looks like Appium has been able to work around it. I hope we will have a solution for it soon. For now I guess I will have to build out a environment using VM's. Is there any blogs that have documented this process? I have been searching but I havent found any, but it seems a lot of people are doing this to drive test automation with multiple devices.

Amit Rawat

unread,
Nov 18, 2015, 9:39:55 AM11/18/15
to calabash-ios
Facebook has recently open-sourced this project which might be your interest.


A Mac OS X library for managing, booting and interacting with multiple iOS Simulators simultaneously.

Joshua Moody

unread,
Dec 3, 2015, 6:38:50 AM12/3/15
to calabash-ios
We will keep an eye on this project.

Thanks for the link.

jjm

Siddharth Pandey

unread,
Apr 8, 2016, 6:02:35 AM4/8/16
to calabash-ios, abard...@gmail.com
I have executed the calabash-ios and executed test on two different devices using the different terminal.
And it executed parallel, Not sure about it. whether it had 1 active instrument process or it has created 2 active instrument process.
But using this approach can the parallel execution be done on iOS ?

used iOS version :: 9.3

Tim Baverstock

unread,
Jun 22, 2016, 12:13:07 PM6/22/16
to calabash-ios, abard...@gmail.com
I'd be very interested in details of your set-up to reproduce your behaviour: I have two iPhones - a 6 and a 5c - plugged into my 10.11.5 laptop, but running calabash-ios console with DEVICE_INFO and DEVICE_ENDPOINT pointing at the two different phones in two different terminals. I found that 'start_test_server_in_background' stopped the application on the other phone almost immediately.

I tried with two different users logged in at the desktop (ssh tunnel 5800 through 5900, open vnc://user@localhost:5900 for the second user), because that's how we got Calabash tests working with multiple simulators, but phones appear to be a different kettle of fish and the second phone just times out its run-loop, regardless of whether the first phone is running or not.

Tim Baverstock

unread,
Jun 24, 2016, 5:56:49 AM6/24/16
to calabash-ios, abard...@gmail.com
My follow-up hasn't appeared here, so - with apologies to the recipients for the doubled response:

It seems I hadn't gone through the 'enable device' fandango for each of my test users: I had to start xcode and wait for windows->devices to load all the phones' symbols. Then calabash was happy to work with them, even after a reboot.

Still can't run two devices as a single user, but at least I don't have to spin up a complete desktop like parallel simulators need.
Reply all
Reply to author
Forward
0 new messages