Question

I'm working on setting up iOS auto build / test flow. Some tools I've used are,

  • Bamboo CI (like Jenkins)
  • Calabash-ios
  • some self-brewed bash to wrap the checkout/build/test flow
  • only simulator for running test, no real device for now
  • a dedicate Mac mini for auto build / test

In order to make the sophisticated test cases running parallel, multiple simulator running concurrently are need. I used this tool to enable multiple simulators (by default iOS simulator doesn't allow multiple instance), and now I can run them in different VNC consoles of different users to my Mac mini.

Then I encountered another problem that the Calabash iOS framework seems hardcoded the port (37265) for the external to connect (cucumber client library), so I still cannot run concurrent Calabash test since different simulator instance will conflict on the same port 127.0.0.1:37265.

However calabash-cucumber allows specifying the ip:port of the test device (or simulator) to connect, if I can pre-create simulator listening to different ip, load app explicitly and tell cucumber to connect to the specified ip:port, then the idea of concurrent tests still works. But seems the iOS simulator somehow is hard coded to listen to 127.0.0.1 interface, right? Any idea how to tell the simulator to bridge itself to specified network interface? If doable, simply setup multiple test-user + multiple network interface will make parallel test on iOS emulator possible.

But also let me know if I'm doing it in the wrong way. Thanks.

Was it helpful?

Solution

The Calabash port can now be changed on per-app basis by adding the following triple to the app's Info.plist:

CalabashServerPort NSNumber < port number >

You are still going to be limited Apple's restrictions on the instruments process: there can only be one active instruments process. Further, the instruments command line tool will not work if the Instruments.app is open.

Other posts have recommended using VMs, but I have no experience with this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top