Appium on Selenium Grid for Parallel Execution

Here is my setup:

On a single user running 2 Appium.app 1.3.7 using Selenium Grid 2.48.2.

Device 0 : /Applications/Appium-1.3.7.app/Contces/node/bin/node
lib/server/main.js --command-timeout 7200 --tmp ~/Temp/Old/ -bp 6001
–native-instruments-lib --nodeconfig ~/Documents/selgridi4.json

Device 1 :
/Applications/Appium-1.3.7-2.app/Contents/Resources/node/bin/node
lib/servercommand-timeout 7200 -p 4726 --tmp ~/Temp/Temp/ -bp 6002
–native-instruments-lib --nodeconfig ~/Documents/selgridi6.json

Selenium hub : java -jar selenium-server-standalone-2.48.2.jar -role hub

selgridi4.json

    {

    "capabilities":

      [

        {

          "browserName": "iPhone4S",

          "version":"7.1.2",

          "maxInstances": 1,

          "platform":"MAC"

        }

      ],

    "configuration":

  {

    "cleanUpCycle":2000,

    "timeout":30000,

    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",

    "url":"http://127.0.0.1:4723/wd/hub",

    "host": "127.0.0.1",

    "port": 4723,

    "maxSession": 1,

    "register": true,

    "registerCycle": 5000,

    "hubPort": 4444,

    "hubHost": "127.0.0.1"

  }

}

selgridi6.json

{

  "capabilities":

      [

        {

          "browserName": "iPhone6",

          "version":"8.1.2",

          "maxInstances": 1,

          "platform":"MAC"

        }

      ],

  "configuration":

  {

    "cleanUpCycle":2000,

    "timeout":30000,

    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",

    "url":"http://127.0.0.1:4726/wd/hub",

    "host": "127.0.0.1",

    "port": 4726,

    "maxSession": 1,

    "register": true,

    "registerCycle": 5000,

    "hubPort": 4444,

    "hubHost": "127.0.0.1"

  }

}

Both appium sessions are able to connect to the selenium hub.

Both fail with instruments crashing.

Note: this is for 2 iOS physical devices using Xcode 7.0 beta 5.

Hey Hi, As far as I know, you can’t handle multiple sessions of Appium at a time for parallel Execution on IOS.
Reference : http://appium.io/slate/en/master/?ruby#parallel-ios-tests

Here: https://github.com/appium/appium/issues/3637 and here: https://github.com/appium/appium/issues/273
People have had some success with running devices in parallel.

“For testing iOS it is possible to do this if you spin up 2+ VMs on a OS-X host. There is some configuration work to send one device to first VM and the second device to the second VM.”

Your description did not make it sound like you are spinning up 2+ VMs on an OS-X host. I don’t know how you can cite someone else’s success using a completely different technique as a reason that what you are trying should work.

That’s an old response over a year old. Here one from Oct 28

no there is no limitation on OSX. you can start many instruments
instances at same time without any trouble. Every appium instance starts
an instruments by using a different tmp folder and a unique port.

You should assign one mobile device or simulator to one appium.

We can use 6 iphone devices on the same mac by using usb hub an 6
appium instances are running and registered to our hub. They can run
parallel tests.

You’ll forgive me for being skeptical of an anonymous internet user with the name ‘shady333’?

Here’s an interesting post in that thread:

shady333 commented 9 days ago
we are on appium 1.3.7 and xcode 7

Is that even a supported setup? When we moved to xcode 7 I had to move to appium 1.4.11. Maybe it would work with real devices but I’m skeptical.

I tried with 1.4.13 and it didn’t work. I’m unsure if it’s my setup or if instruments just don’t support it and people are just pulling my chain. It seems like some people get it to work, others do not.

Well, if you do get it working I’m happy to eat crow. This is something I could really use but my research indicated that it wasn’t possible. I do wish you luck and I’m sorry I don’t have more help to offer.

Hi Team,

   Apart from Android testing how to get uid of real devices to the connected MAC OS.suppose in appium grid we need to execute the app in multiple devices the same way how to execute the app multiple ios real devices. how to pass bundle id to the script and when we to create the provisional profile for testing ios devices.

I have recently Tried with following setup -

On Macbook OSX -10+
Appium - npm install version 1.5.3

I hosted 2 appium servers one for ios simulator and ios realdevice on single macos. Registered them to selenium grid
And I could run the same test script in parallel on both devices using python.

http://techqarifad.blogspot.com/ follow the steps working

do you have any working github repo ?

can you please check my post Appium - Parallel Execution (Grid), let me know if you’ve answers to queries I asked there.