Appium - Parallel Execution (Grid)

Here is my setup… hope it will solve parallel execution issue.

Hi,

can you please suggest us how can we make sure two appium server start for parallel device execution with out using selenium grid
looking for u r reply

Thanks in advance

chari.

You can just start the two nodes without registering it into the hub.

Can I execute parallel test without grid? If yes then How? please suggest

@bhaskar

my selenium grid is running but when i try to run node server by “node appium --nodeconfig /Users/RajShekhar_DiroLabs/Desktop/node1.json -p 4730 -bp 4730”

its shows me logs like
Appium] Welcome to Appium v1.5.2
[Appium] Non-default server args:
[Appium] port: 4730
[Appium] bootstrapPort: 4730
[Appium] nodeconfig: ‘/Users/RajShekhar_DiroLabs/Desktop/node1.json’
[Appium] Unable to load node configuration file to register with grid: ENOENT: no such file or directory, open ‘/Users/RajShekhar_DiroLabs/Desktop/node1.json’
[Appium] Appium REST http interface listener started on 0.0.0.0:4730

but shows Unable to load node configuration file to register with grid: ENOENT: no such file or directory, open ‘/Users/RajShekhar_DiroLabs/Desktop/node1.json’

Can any one please suggest me how to load node with selenium grid
json file
{
“capabilities”:
[ {
“browserName”:
“Android”, “version”:“5.0.1”,
“maxInstances”: 3,
“platform”:“ANDROID”,
“deviceName”:“FCAZGU007688H3D” } ],
“configuration”:
{
“nodeTimeout”:120, “port”:4730, “hubPort”:4444,
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“url”:“http://127.0.0.1:4730/wd/hub”,
“hub”: “127.0.0.1:4444/grid/register”,
“hubHost”:“127.0.0.1”,
“nodePolling”:2000,
“registerCycle”:10000,
“register”:true,
“cleanUpCycle”:2000,
“timeout”:30000,
“maxSession”:1
} }

@saikrishna321 Is it possible parallel execution in iOS devices?

@sanoj27 yeah you can run parallel tests on iOS real devices …

hello,

During start node server it shows a error “Syntax error in node configuration file: Unexpected token P”

srikantas-Mac-mini-3:bin RajShekhar_DiroLabs$ appium --nodeconfig /Users/RajShekhar_DiroLabs/Desktop/node1.json -p 4730
[Appium] Welcome to Appium v1.5.2
[Appium] Non-default server args:
[Appium] port: 4730
[Appium] nodeconfig: ‘/Users/RajShekhar_DiroLabs/Desktop/node1.json’
[Appium] Error: Syntax error in node configuration file: Unexpected token P
at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)
at postRequest$ (lib/grid-register.js:42:12)

Can any one please suggest me how to resolve it

I am able to run appium tests on two different devices but they run one after the other. I want them to run on both the devices simultaneously(parallel). I am running appium on two different ports.This is how I am doing it.
appium -p 4725 -bp 4735 -U “706b9496” --chromedriver-port 9518
appium -p 4735 -bp 4745 -U “ZX1B34JFZK” --chromedriver-port 9528

Can anyone help me how to do it?

Hello,

Can any one please help me ,
My nodes are working on hub but when i run my script it shows on hub
13:16:06.657 INFO - Available nodes: [http://0.0.0.0:4725]
13:16:06.657 INFO - Trying to create a new session on node http://0.0.0.0:4725
13:16:06.657 INFO - Trying to create a new session on test slot {maxInstance=1, browserName=Android, version=5.0 .2 , platform=ANDROID}

but in node shows error missing plateformName and shows version name blank i can not recognize that node picking desired capabilities from where
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“browserName”:“android”,“version”:"",“platform”:“ANDROID”}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“browserName”:“android”,“version”:"",“platform”:“ANDROID”},null,null,null,null,null,null,null,null,null,null,null,null,null]
[MJSONWP] Encountered internal error running command: Error: You must include a platformName capability
at AppiumDriver.getDriverForCaps (lib/appium.js:40:13)
at AppiumDriver.createSession$ (lib/appium.js:91:28)

With 1.5 new features says, you can start multiple sessions in 1 server. Or did i understand badly?

At the moment I’m using 2 emulators in paralel with selenium grid. It works fine but I have to open a new appium server for all emulators I need. So if I want to run with 20 different device emulators, I need to launch 20 appium server, which is not cool. My configuration is like this;

appium -a 172.20.0.196 -p 4723 --session-override --nodeconfig appiumnodeconfig1.json
appium -a 172.20.0.196 -p 4724 --session-override --nodeconfig appiumnodeconfig2.json

appiumnodeconfig1.json:
{
“capabilities”: [
{
“browserName”: “android”,
“version”: “5.1”,
“platform”: “ANDROID”,
“maxInstances”: 1,
“deviceName”: “192.168.56.101:5555”
}
],
“configuration”: {
“nodeTimeout” : 120,
“port”: 4723,
“hubPort”: 4444,
“url”: “http://172.20.0.196:4723/wd/hub”,
“hub”: “172.20.0.196:4444/grid/register”,
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“hubHost”: “172.20.0.196”,
“nodePolling”: 2000,
“registerCycle”: 10000,
“register”: true,
“cleanUpCycle”: 2000,
“timeout”: 30000,
“maxSession”: 1
}
}

appiumnodeconfig2.json:
{
“capabilities”: [
{
“browserName”: “android”,
“version”: “5.1”,
“platform”: “ANDROID”,
“maxInstances”: 1,
“deviceName”: “192.168.56.102:5555”
}
],
“configuration”: {
“nodeTimeout” : 120,
“port”: 4724,
“hubPort”: 4444,
“url”: “http://172.20.0.196:4724/wd/hub”,
“hub”: “172.20.0.196:4444/grid/register”,
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“hubHost”: “172.20.0.196”,
“nodePolling”: 2000,
“registerCycle”: 10000,
“register”: true,
“cleanUpCycle”: 2000,
“timeout”: 30000,
“maxSession”: 1
}
}

The thing is, I want to start only 1 appium server and connect multiple emulators to it. Can I do it and how?
Thanks in advance

Check here www.appiumforbeginners.com for Appium Grid concept

Thank you but it doesn’t answer my question. Tutorials on the website shows exactly the same configuration with mine. You have to open a server for every node.

But I already got the answer from Jonathan Lipps yesterday. He told me that 1.5 work was the groundwork for that new feature, but the feature itself is not released. I guess we’re going to have to wait unfortunately.

1 Like

Yes you can run by use parallel thread concepts with out use selenium grid

Hi @pushpank

Can you please share the steps to run appium script parallel without using selenium grid infrastructure.

Thanks
Ravi Kumar

Hi @bhaskar,

After doing everything as I found in the discussions, I was able to launch android app in multiple devices in parallel. But after that, only one device was able to finish the rest of the automation, other devices got stuck right after launching app.

P.S.: I was able to launch apps using session overriding, otherwise I was not able to launch apps in parallel even though different servers were running.

Thanks,
Minar

http://blog.zymr.com/configuring-appium-node-servers-with-selenium-grid

Hi @ravikr42

Sorry for late reply , pls share your email id .

You can use parallel thread .
First you have to run appium server then auto connect android device ,
write code parallel thread to run multi android devices .
Tommorow i will share u sample code .

Thanks & Regards
Pushpank kaushik

Hi @pushpank

Can you please share the code.

Thanks
Ravi