# Facing issue in Parallel execution for multiple devices

**URL:** <https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605>\
**Category:** Support\
**Created:** [July 7, 2017, 2:52pm UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605 "2017-07-07T14:52:27Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![SharmaSumit](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@SharmaSumit](https://discuss.appium.io/u/SharmaSumit)\
**Post date:** [July 7, 2017, 2:52pm UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/1 "2017-07-07T14:52:27Z")

</div>

HI,

I want execute my automation script parallely in multiple devices. I have launch selenium grid and registered two different nodes in selenium grid server. Both devices has been successfully registered as nodes in server.

 ![](https://discuss.appium.io/uploads/default/original/2X/6/6863987b46e0d0e91b5b222b1855bdbca8be3070.png)

After executing script through TestNG my test script is successfully running in one device but for other device I am getting below error.

org.openqa.selenium.SessionNotCreatedException: A new session could not be created. Details: Problem getting session data for driver type AndroidDriver; does it implement ‘get driverData’? (WARNING: The server did not provide any stacktrace information)  
Command duration or timeout: 3.92 seconds  
Build info: version: ‘2.53.1’, revision: ‘a36b8b1cd5757287168e54b817830adce9b0158d’, time: ‘2016-06-30 19:26:09’  
System info: host: ‘Sumit-inteliMac.local’, ip: ‘10.10.45.168’, os.name: ‘Mac OS X’, os.arch: ‘x86\_64’, os.version: ‘10.11.4’, java.version: ‘1.8.0\_121’  
Driver info: io.appium.java\_client.android.AndroidDriver

Below are the BastTest setup and TestNG.xml setup

 ![](https://discuss.appium.io/uploads/default/original/2X/3/3a6df4cde9228b45daa1f4443abed4895449e43b.png)

testng.xml

![](https://discuss.appium.io/uploads/default/original/2X/4/40da2f139064a8c1011df1b9d4d359e537dc5b8e.png)

Regards,  
Sumit Sharma

---

<div class="post-metadata">

**Author:** ![s10v10s](https://discuss.appium.io/user_avatar/discuss.appium.io/s10v10s/32/3633_2.png) [@s10v10s](https://discuss.appium.io/u/s10v10s)\
**Post date:** [July 8, 2017, 8:16am UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/2 "2017-07-08T08:16:34Z")

</div>

Change Parallel= ‘Test’ to **Methods** in Testng xml

Hopefully It will work.

---

<div class="post-metadata">

**Author:** ![SharmaSumit](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@SharmaSumit](https://discuss.appium.io/u/SharmaSumit)\
**Post date:** [July 10, 2017, 6:54am UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/3 "2017-07-10T06:54:12Z")

</div>

Hello,  
I changed in xml file Parallel = tests to methods. But still facing the same issue.

**org.openqa.selenium.SessionNotCreatedException: A new session could not be created. Details: Problem getting session data for driver type AndroidDriver; does it implement ‘get driverData’? (WARNING: The server did not provide any stacktrace information)**  
**Command duration or timeout: 17 milliseconds**  
**Build info: version: ‘2.53.1’, revision: ‘a36b8b1cd5757287168e54b817830adce9b0158d’, time: '2016-06-30 19:26:09’**  
**System info: host: ‘Sumit-inteliMac.local’, ip: ‘10.10.45.168’, os.name: ‘Mac OS X’, os.arch: ‘x86\_64’, os.version: ‘10.11.4’, java.version: '1.8.0\_121’**  
**Driver info: io.appium.java\_client.android.AndroidDriver**

Please help me to resolve this issue.

---

<div class="post-metadata">

**Author:** ![s10v10s](https://discuss.appium.io/user_avatar/discuss.appium.io/s10v10s/32/3633_2.png) [@s10v10s](https://discuss.appium.io/u/s10v10s)\
**Post date:** [July 10, 2017, 7:11am UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/4 "2017-07-10T07:11:39Z")

</div>

“  
**suite name=“Parallel test suite” parallel=“methods” thread-count=“2”\>**  
\*\* test name=“Regression 1”\>\*\*  
\*\* classes\>\*\*  
\*\* class name=“packagename.classname1”/\>\*\*  
\*\* class name=“Packagename.classname2”/\>\*\*  
\*\* /classes\>\*\*  
\*\* /test\>\*\*  
**/suite\>** ”

Try This!!

---

<div class="post-metadata">

**Author:** ![SharmaSumit](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@SharmaSumit](https://discuss.appium.io/u/SharmaSumit)\
**Post date:** [July 10, 2017, 8:40am UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/5 "2017-07-10T08:40:34Z")

</div>

Tried above XML configuration but Still the same issue coming.

 ![](https://discuss.appium.io/uploads/default/original/2X/9/96bd2b83a13fbabfc1063034e5341b46657c3dc8.png)

---

<div class="post-metadata">

**Author:** ![s10v10s](https://discuss.appium.io/user_avatar/discuss.appium.io/s10v10s/32/3633_2.png) [@s10v10s](https://discuss.appium.io/u/s10v10s)\
**Post date:** [July 10, 2017, 9:00am UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/6 "2017-07-10T09:00:43Z")

</div>

Is your install via usb from developer option enabled

---

<div class="post-metadata">

**Author:** ![SharmaSumit](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@SharmaSumit](https://discuss.appium.io/u/SharmaSumit)\
**Post date:** [July 10, 2017, 9:56am UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/7 "2017-07-10T09:56:10Z")

</div>

yes in device settings “install via USB” option is already enabled. Also when we run the script only in one particular device its running perfectly.

@bhaskar @Arvind_Patel @Appium_Master. Will you please help me to achieve parallel execution.

---

<div class="post-metadata">

**Author:** ![s10v10s](https://discuss.appium.io/user_avatar/discuss.appium.io/s10v10s/32/3633_2.png) [@s10v10s](https://discuss.appium.io/u/s10v10s)\
**Post date:** [July 10, 2017, 11:48am UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/8 "2017-07-10T11:48:32Z")

</div>

Remove .apk path and run the script and run the xml

---

<div class="post-metadata">

**Author:** ![s10v10s](https://discuss.appium.io/user_avatar/discuss.appium.io/s10v10s/32/3633_2.png) [@s10v10s](https://discuss.appium.io/u/s10v10s)\
**Post date:** [July 10, 2017, 11:51am UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/9 "2017-07-10T11:51:47Z")

</div>

Actually @SharmaSumit u are not creating 2 different instances of appium .  
Please open two instance and give separate host 0.0.0.0 and 127.0.0.1and port name 4734 and 4723

Try these with 2 instances and It will work perfectly

---

<div class="post-metadata">

**Author:** ![SharmaSumit](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@SharmaSumit](https://discuss.appium.io/u/SharmaSumit)\
**Post date:** [July 10, 2017, 3:02pm UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/10 "2017-07-10T15:02:52Z")

</div>

Thanks for the reply, I will try this.

---

<div class="post-metadata">

**Author:** ![SharmaSumit](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@SharmaSumit](https://discuss.appium.io/u/SharmaSumit)\
**Post date:** [July 11, 2017, 7:48pm UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/11 "2017-07-11T19:48:59Z")

</div>

Hello @s10v10s i created two different instance of driver and now its working fine. Thank you…

---

<div class="post-metadata">

**Author:** ![VikramVI](https://discuss.appium.io/user_avatar/discuss.appium.io/vikramvi/32/116_2.png) [@VikramVI](https://discuss.appium.io/u/VikramVI)\
**Post date:** [August 4, 2017, 12:40pm UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/12 "2017-08-04T12:40:37Z")

</div>

> [@Appium - Parallel Execution (Grid)](https://discuss.appium.io/t/appium-parallel-execution-grid/4375/144):
>
> For those who are still struggling with appium parallel execution, you can refer to below github repo some more issues which I need to find answer assigning test cases/ classes to available nodes at run time instead of hard coded currently in case a nodes goes down, reassign its test cases/classes to another node/s flexible parallel ( compatibility testing ) & distributed run ( quick regression ) , currently this part is also hard coded. In case you’ve answers to these, please upd…

---

<div class="post-metadata">

**Author:** ![aruns](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@aruns](https://discuss.appium.io/u/aruns)\
**Post date:** [March 21, 2018, 2:29pm UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/13 "2018-03-21T14:29:48Z")

</div>

Hi Vikram,

I am facing few problems in appium for a particular functionality automating with CHAT Feature automation.  
Actually one test case in need to verify in such a way that, i need to login with one device select the user name and send the SMS to that particular person and then i need to switch to another machine with different port number and login and verify the SMS sent and i need to reply for that. Now the real challenge come into picture, where i need to switch back to previous session or previous port and i need to verify the replied SMS.

Do u have any idea on this. i am really struggling with it like

Regards,  
Arun

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [March 21, 2018, 9:06pm UTC](https://discuss.appium.io/t/facing-issue-in-parallel-execution-for-multiple-devices/17605/14 "2018-03-21T21:06:29Z")

</div>

@aruns you need start 2 appium servers and start 2 drivers. One connecting to one device another to other device. No you can chat between.

I made such solution for payments when i am sending payment from one user to another and return.
