This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
19 / 137
Jun 2015

Please have a look on the following topic :-

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.txt148 (411 Bytes) nodeconfig1.txt105 (415 Bytes)

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.txt257 (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.

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?

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.

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

The error is coming only when you're trying to start another appium server with the same port number...and in the picture you were not given different appium port numbers and bootstrap numbers. Could you please check them once and give --udid XYZZZZZZ along with them if possible.

UDID is for iOS devices..right?

Also, m able to create grid properly now. Thanks a lot.

Now the test case is failing. Throwing null pointer exception

That sounds great.!!!! :wink:
udid means serial number of your andriod device too... just type a command in your cmd prompt "adb devices" , you'll find a unique number for each device that is udid only.Check your log once.

Regards,
Bhaskar.

Successfully created grid and node.
When executed, out of 2 tests 1 of them fail... even though device id is mentioned it is getting executed on another device. Its running only on one device at a time

Throwing an error: org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: The following desired capabilities are required, but were not provided: deviceName)

Even though the deviceName is correct and same as mentioned in .json file

Hi @RISHI_KHANNA ,

Please make change "device" as "deviceName" in your nodeconfig.json file ,have a try . it may resolved.But in my case it is working fine with device...

Thanks,
Bhaskar.

Hi Bhaskar,

While running test from testing suite, yes...you can run parallel on local machine.
but is there any way in testing if
1. I want to run test on different machine
2. I want to run test on Different OS (like MAC )

As per my knowledge selenium standalone server used to achieve above points

Hi @Arvind_Patel,

Good Point raised :+1: .
As of now we can run multiple tests on different OS's and machines too for Web based Automation using Selenium (acts Selenium server.jar as both Hub and Node). But consider for Mobile Automation Appium is a Server that can not handle multiple sessions at a time till now .

I haven't done your requirements till now. Apparently, the above comments you're mentioned mayn't possible i guess (i'm not sure). Please check the same with others too and have a look on the following link .


Regards,
Vijay Bhaskar.

Best to use separate VMs one appium server per device. We are working on a appium rewrite which should make this better.

@Arvind_Patel @bhaskar:
Answer to arvind's question : That can be also achieved using parametrization of machine name/machine ip.
just pass machine ip/machine name just like port number and it will run on those machines at the same time.

You need to create variable
String MachineIp=127.0.0.1;
String portNumber=4723;
driver = new AndroidDriver(new URL("http://MachineIp:portNumber/wd/hub"), capabilities);