Facing issue in Parallel execution for multiple devices

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.

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

testng.xml

Regards,
Sumit Sharma

Change Parallel= ‘Test’ to Methods in Testng xml

Hopefully It will work.

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.


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!!

Tried above XML configuration but Still the same issue coming.

Is your install via usb from developer option enabled

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.

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

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

Thanks for the reply, I will try this.

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

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

@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.