Is there any way to run parallel test in appium just like selenium grid? How can we set different nodes in appium?
6 Answers
The problem is that appium is using the iosSimulator or a Genymotion VM exclusively, and isn't really designed to run parallel on one machine like that. You can, however, set up multiple VMs with their own instances of appium running (I feel like this would be slow, but is theoretically an option), or use BrowserStack, Sauce Labs, or something similar in order to run multiple tests at once.

- 41
- 8
-
I am using Appium with Genymotion and run two emulators in parallel. It is very easy set up and also running multiple VM's should not affect appium functionality, might slow down the system. Also sauce labs and browser stack is really very slow compared to Genymotion. – Vinay Apr 27 '16 at 07:48
Yes, we can achieve parallel execution as like Selenium using GRID concept.
u need to start node by placing following content in ur json file
{ "capabilities":
[
{ "browserName": "<e.g._iPhone5_or_iPad4>",
"version":"<version_of_iOS_e.g._7.1>",
"maxInstances": 1,
"platform":"<platform_e.g._MAC_or_ANDROID>"
}
],
"configuration":
{
"cleanUpCycle":2000,
"timeout":30000,
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"url":"http://<host_name_appium_server_or_ip-address_appium_server>:<appium_port>/wd/hub",
"host": <host_name_appium_server_or_ip-address_appium_server>,
"port": <appium_port>,
"maxSession": 1,
"register": true,
"registerCycle": 5000,
"hubPort": <grid_port>,
"hubHost": "<Grid_host_name_or_grid_ip-address>"
} }
look in this post http://qaautomationworld.blogspot.in/2014/11/appium-remote-execution-grid-execution.html

- 591
- 1
- 4
- 16
-
do you use junit or testng or cucumber to execute tests in parallel ? – vikramvi Feb 17 '17 at 11:52
This can we do using TestNg also can be implemented using Multithreading.
IN selenium Grid need to run one Hub and different-node but in this case you run multiple Appium server in different-2 port

- 1,129
- 10
- 26
-
This is the approach that I use on my last company... using several Appium server run on different port and combining it with SeleniumGrid. Its possible on Android (with Linux or Unix like machine where the appium servers run). But still cannot do it with iOS, since iOS is using only one instance Instrument when running automation test with real device or simulator. – Hayi Nukman Dec 23 '15 at 06:06
Following command can be used to start multiple Appium servers
appium -p 10000 # server 1
appium -p 10001 # server 2

- 29,388
- 11
- 94
- 103

- 46
- 2
you can refer this parallel test with appium & selenium grid
As for to run Appium in Grid follow the steps
Step1: add the Appium in Environment Vairable
Step2: Run the Grid for Hub
Step3: Run the Appium through command prompt using the selective commands
Step4: Run you java code through Maven command 'mvn'
To achieve parallel Testing through Appium, I have used Selenium Grid and TestNG along with Appium.
Steps:
- Start Selenium Server. (This will be the Hub for Selenium Grid)
- Start Appium Server on default Port (This will be the Hub for appium Grid Configuration)
- Now on different ports, initialise the nodes (Node1, Node2) with the matching capabilities as defined in TestNG.xml/Properties file. (Both the node configurations must be defined in seperate json.cfg file)
- Add a parameter in testNG.xml as parallel="tests".
Ensure that the device/emulators with matching capabilities is connected.

- 353
- 3
- 8