# Appium - Parallel Execution (Grid)

**URL:** <https://discuss.appium.io/t/appium-parallel-execution-grid/4375>\
**Category:** Support\
**Created:** [May 18, 2015, 12:58pm UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375 "2015-05-18T12:58:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhaskar](https://discuss.appium.io/user_avatar/discuss.appium.io/bhaskar/32/1204_2.png) [@bhaskar](https://discuss.appium.io/u/bhaskar)\
**Post date:** [May 18, 2015, 12:58pm UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/1 "2015-05-18T12:58:31Z")

</div>

## Is it Necessary to Start Selenium Standalone Server for Parallel Execution?
I am able to run tests parallel on multiple devices, by giving different udids , appium port numbers with out configuration json files... \*\*Please let me know Is Selenium Hub should be launched for Parallel Execution? and what is the use when it comes to Appium.!!!\*\*

Thank you in advance,  
Vijay Bhaskar.

---

<div class="post-metadata">

**Author:** ![jonahss](https://discuss.appium.io/user_avatar/discuss.appium.io/jonahss/32/5340_2.png) [@jonahss](https://discuss.appium.io/u/jonahss)\
**Post date:** [May 22, 2015, 1:15am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/4 "2015-05-22T01:15:53Z")

</div>

Oh boy I have no idea. The appium developer team focuses on getting appium to work, and doesn’t directly support selenium grid. I’ve seen posts here of people who are actively using it though.

Sneak peek: We are currently working on a major refactor of the internal architecture of appium, and the new code will make it possible for us to finally implement multiple sessions from a single appium server =D

---

<div class="post-metadata">

**Author:** ![bhaskar](https://discuss.appium.io/user_avatar/discuss.appium.io/bhaskar/32/1204_2.png) [@bhaskar](https://discuss.appium.io/u/bhaskar)\
**Post date:** [May 22, 2015, 5:22am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/5 "2015-05-22T05:22:07Z")

</div>

Thank you @jonahss .Eagarly waiting for the same 😃

Hope will get suggestions for the same.

Thanks,  
Bhaskar.

---

<div class="post-metadata">

**Author:** ![veeraBrahmachari\_K](https://discuss.appium.io/letter_avatar_proxy/v4/letter/v/65b543/32.png) [@veeraBrahmachari\_K](https://discuss.appium.io/u/veeraBrahmachari_K)\
**Post date:** [May 22, 2015, 8:50am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/6 "2015-05-22T08:50:01Z")

</div>

hi basker,

can u please let me know how to write a selenium program should be execute in multiple android devices(for example 2 devices)  
can u help me that how to start.

---

<div class="post-metadata">

**Author:** ![bhaskar](https://discuss.appium.io/user_avatar/discuss.appium.io/bhaskar/32/1204_2.png) [@bhaskar](https://discuss.appium.io/u/bhaskar)\
**Post date:** [May 22, 2015, 9:05am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/7 "2015-05-22T09:05:28Z")

</div>

Hi @veeraBrahmachari_K,

1)Start Selenium server as Hub just placing a cmd : java -jar selenium…jar -role hub hubconfig.json  
2) Start two appium servers as nodes for two devices as,  
i)appium --nodeconfig path\to\nodeconfig1.json -p 4723  
ii)appium --nodeconfig path\to\secondconfigfile\nodeconfig2.json -p 4724  
3) You can call them through testng.xml as parallel tests.

Regards,  
Bhaskar.

---

<div class="post-metadata">

**Author:** ![veeraBrahmachari\_K](https://discuss.appium.io/letter_avatar_proxy/v4/letter/v/65b543/32.png) [@veeraBrahmachari\_K](https://discuss.appium.io/u/veeraBrahmachari_K)\
**Post date:** [May 22, 2015, 9:50am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/8 "2015-05-22T09:50:17Z")

</div>

hi basker,  
really i am telling that i am new to appium  
and i did configuration and all i am able to execute one or two programs on emulators and real devices  
now my task to execute same program on two devices parallel, and two different test case have to execute on different devices at same time

please help me how to start and what are the requirements

---

<div class="post-metadata">

**Author:** ![RISHI\_KHANNA](https://discuss.appium.io/user_avatar/discuss.appium.io/rishi_khanna/32/9278_2.png) [@RISHI\_KHANNA](https://discuss.appium.io/u/RISHI_KHANNA)\
**Post date:** [May 29, 2015, 9:34am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/9 "2015-05-29T09:34:58Z")

</div>

Hi Bhaskar,

Can you be more specific on how to create node?  
I could not locate nodeconfig path.

Thanks

---

<div class="post-metadata">

**Author:** ![bhaskar](https://discuss.appium.io/user_avatar/discuss.appium.io/bhaskar/32/1204_2.png) [@bhaskar](https://discuss.appium.io/u/bhaskar)\
**Post date:** [May 29, 2015, 11:17am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/10 "2015-05-29T11:17:23Z")

</div>

hi @RISHI_KHANNA ,

If you are running appium from (Appium.exe) path then ,  
**node appium --nodeconfig path\to\nodeconfig.json -p 4724 -bp 5724**

(or) if you’re doing from cmd,  
**appium --nodeconfig path\to\nodeconfig1.json -p 4724 -bp 5724**

Note: “path\to\nodeconfig1.json” is where your node configuration json file locates…e.g. D:\file\nodeconfig.json

Json File should like as follows and please made changes according to you and pls let me know whether it works or not :

[nodeconfig.txt](https://discuss.appium.io/uploads/default/original/e/4/e4588c332587481c34663495be0d07194f460df4.txt) (449 Bytes)

Thanks,  
Bhaskar.

---

<div class="post-metadata">

**Author:** ![RISHI\_KHANNA](https://discuss.appium.io/user_avatar/discuss.appium.io/rishi_khanna/32/9278_2.png) [@RISHI\_KHANNA](https://discuss.appium.io/u/RISHI_KHANNA)\
**Post date:** [May 29, 2015, 11:47am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/11 "2015-05-29T11:47:44Z")

</div>

nodeconfig.json: This particular json file should come with node.js?  
I am unable to locate this on my system

---

<div class="post-metadata">

**Author:** ![Khushboo\_Kaur](https://discuss.appium.io/letter_avatar_proxy/v4/letter/k/d9b06d/32.png) [@Khushboo\_Kaur](https://discuss.appium.io/u/Khushboo_Kaur)\
**Post date:** [May 29, 2015, 11:59am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/12 "2015-05-29T11:59:56Z")

</div>

Instead of Node configuration files, you can also write the java junit/testng code pieces and invoke this java test code as parallel execution units. I don’t think we require to start the Selenium Standalone servers here. Appium server has nothing to do with Selenium Standalone servers. Once two Appium instances run on two different ports, these will simultaneously test two devices at one time.

---

<div class="post-metadata">

**Author:** ![bhaskar](https://discuss.appium.io/user_avatar/discuss.appium.io/bhaskar/32/1204_2.png) [@bhaskar](https://discuss.appium.io/u/bhaskar)\
**Post date:** [May 29, 2015, 12:26pm UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/13 "2015-05-29T12:26:58Z")

</div>

Hi,

It should not come with node.js .We have to create json file manually with .json extension.  
I guess you might think of package.json (not used for Grid ).  
Please save that txt file to json file and use it ,will get it resolved. (Please make sure that Selenium Hub is already in running state).

Thanks,  
Bhaskar

---

<div class="post-metadata">

**Author:** ![bhaskar](https://discuss.appium.io/user_avatar/discuss.appium.io/bhaskar/32/1204_2.png) [@bhaskar](https://discuss.appium.io/u/bhaskar)\
**Post date:** [May 29, 2015, 12:33pm UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/14 "2015-05-29T12:33:25Z")

</div>

Yes @Khushboo_Kaur ,  
I agree with you. I’m able to run multiple devices on parallel with out Selenium Hub configuration. But the Appium team had mentioned [http://appium.io/slate/en/v1.3.6/?java#selenium-grid](http://appium.io/slate/en/v1.3.6/?java#selenium-grid) here.

---

<div class="post-metadata">

**Author:** ![RISHI\_KHANNA](https://discuss.appium.io/user_avatar/discuss.appium.io/rishi_khanna/32/9278_2.png) [@RISHI\_KHANNA](https://discuss.appium.io/u/RISHI_KHANNA)\
**Post date:** [May 29, 2015, 3:02pm UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/15 "2015-05-29T15:02:48Z")

</div>

Can you tell me that work around? How can we achieve parallel execution using Appium?

---

<div class="post-metadata">

**Author:** ![bhaskar](https://discuss.appium.io/user_avatar/discuss.appium.io/bhaskar/32/1204_2.png) [@bhaskar](https://discuss.appium.io/u/bhaskar)\
**Post date:** [May 29, 2015, 3:05pm UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/16 "2015-05-29T15:05:11Z")

</div>

Please have a look on the following topic :-

> [@Connecting appium server to selenium grid for android](https://discuss.appium.io/t/connecting-appium-server-to-selenium-grid-for-android/804/114):
>
> @rgonalo@Hassan_Radi@Arvind_Patel@karthik_holla I have created a separate thread for this discussion but decided to include this question in this thread as it seems to be active. I need help on running test cases from Selenium Grid server machine running as a hub with the devices connected to the node and here’s what I have: I have a iMac running Mavericks (10.9.5) running Selenium Grid server as a hub. I also have a MacBook Air (running on Mavericks) running Selenium Grid as a node. Ap…

---

<div class="post-metadata">

**Author:** ![pavelzagalsky](https://discuss.appium.io/user_avatar/discuss.appium.io/pavelzagalsky/32/1220_2.png) [@pavelzagalsky](https://discuss.appium.io/u/pavelzagalsky)\
**Post date:** [May 31, 2015, 9:50am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/17 "2015-05-31T09:50:53Z")

</div>

This is awesome.  
Hope to hear updates soon!

---

<div class="post-metadata">

**Author:** ![RISHI\_KHANNA](https://discuss.appium.io/user_avatar/discuss.appium.io/rishi_khanna/32/9278_2.png) [@RISHI\_KHANNA](https://discuss.appium.io/u/RISHI_KHANNA)\
**Post date:** [June 1, 2015, 7:16am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/18 "2015-06-01T07:16:24Z")

</div>

Hi,  
I tried setting up the configuration but getting error “Request to register with was unsuccessful.”  
I tried to create two instances of appium. Started my appium.exe on two different port numbers 4720 and 4730.  
Started my grid server using : “java -jar selenium-server-standalone-2.45.0.jar -role hub”  
Node server1 : appium --nodeconfig C:\Users\rishi.kumar.khanna\Desktop\nodeconfig1.json -p 4730 -bp 5724

Node Server2: appium --nodeconfig C:\Users\rishi.kumar.khanna\Desktop\nodeconfig.json -p 4720 -bp 5724

[nodeconfig.txt](https://discuss.appium.io/uploads/default/original/2X/1/1c7eb270d3c4bbe87c9beb4c7a94a74d4cde6578.txt) (411 Bytes) [nodeconfig1.txt](https://discuss.appium.io/uploads/default/original/2X/0/0868d2cec606270d5b6ed2408d0fe05b6a50d8c8.txt) (415 Bytes)

---

<div class="post-metadata">

**Author:** ![bhaskar](https://discuss.appium.io/user_avatar/discuss.appium.io/bhaskar/32/1204_2.png) [@bhaskar](https://discuss.appium.io/u/bhaskar)\
**Post date:** [June 1, 2015, 7:23am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/19 "2015-06-01T07:23:43Z")

</div>

Hi @RISHI_KHANNA ,  
Nice to hear that you’re trying and almost done…  
You have to start Selenium Server as a hub with json file. have a try with the following and they’re…  
[HubConfig.txt](https://discuss.appium.io/uploads/default/original/2X/7/766b718552c55046db0f0db5cc06ac5a7c3fe88c.txt) (329 Bytes)

**java -jar selenium-server-standalone-2.45.0.jar -role hub -hubConfig path\to\HubConfig.json**

Hope this will get resolved.  
Thanks,  
Vijay Bhaskar.

---

<div class="post-metadata">

**Author:** ![RISHI\_KHANNA](https://discuss.appium.io/user_avatar/discuss.appium.io/rishi_khanna/32/9278_2.png) [@RISHI\_KHANNA](https://discuss.appium.io/u/RISHI_KHANNA)\
**Post date:** [June 1, 2015, 7:37am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/20 "2015-06-01T07:37:32Z")

</div>

Hi,

Thanks for the prompt help. But still facing the same issue. Can you check my both nodeconfig files?One more doubt - while creating nodes from cmd do I need to open the appium.exe on both the ports manually?

---

<div class="post-metadata">

**Author:** ![bhaskar](https://discuss.appium.io/user_avatar/discuss.appium.io/bhaskar/32/1204_2.png) [@bhaskar](https://discuss.appium.io/u/bhaskar)\
**Post date:** [June 1, 2015, 9:18am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/21 "2015-06-01T09:18:06Z")

</div>

Hi,  
No need to open GUI mode Appium server because you’re already done appium servers with Command Prompt with Json files. I saw your config files and they are fine.  
I guess you’re giving same bootstrap port number to both nodes.please have a try with different port nums.  
-bp 5723 & -bp 5724

Hope will get resolved…!!!  
Regards,  
Bhaskar.

---

<div class="post-metadata">

**Author:** ![RISHI\_KHANNA](https://discuss.appium.io/user_avatar/discuss.appium.io/rishi_khanna/32/9278_2.png) [@RISHI\_KHANNA](https://discuss.appium.io/u/RISHI_KHANNA)\
**Post date:** [June 1, 2015, 9:50am UTC](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/22 "2015-06-01T09:50:21Z")

</div>

Its still not working. Throwing error Unexpected token. Find the screenshot- capture.

Also, we I tried creating node without passing bp and port in command line, only one appium instance was registered on hub . For second instace its throwing an error “Pleas make sure only one appium instance is running”  
Screenshot- capture2 ![](https://discuss.appium.io/uploads/default/original/2X/7/73c04301f927bdedee6122a3cb49a1d1e86b44ed.PNG)

 ![](https://discuss.appium.io/uploads/default/original/2X/4/47fc6f469d6571eb05364a5239c30cc97f833c68.PNG)

[Next page](https://discuss.appium.io/t/appium-parallel-execution-grid/4375.md?page=2)
