How to use the Remote server functionality?


#1

Hi

I’m an appium newbie and would like to use the ”Remote Server” functionality. I have googled but did not find good information about it, or how to use it. Hope you can help 

Here is my current setup:
I’m on a Windows machine where I use Java/TestNG/Eclipse to write automatic test cases with appium. I have an android device connected to a MAC mini machine. How can I run tests on the Windows machine , that communicates with a device connected to the MAC machine?

I can connect an android device to the Windows machine and successfully run automatic test against it locally. I can also connect the android device on the MAC and run things locally successful. However now I would like to move my device and connect it to a MAC mini and remotely run tests on it from my Windows machine. How can I do this?

Eventually I will replace my android device with a iOS device, so I need it to run on the MAC, while the tests executes on my Windows machine (as that is where I would like to develop the tests). According to the documentation, it says:
“… You can however use the Remote Server option to connect to an Appium server running on a Mac“

Any help how to achieve this (or any pointers to examples) is highly appreciated!

Regards
Alex


Running appuim remotely from a server
Is this possible to run appium for IOS real device on window 7
#2

The method name is different for every language, but they all have a way of instantiating a WebDriver object with a parameter with the url of your remote server. That’s all you need to do :smile:


#3

Thanks! Now it works :smile:

I changed the URL address passed to the constructor of:
new AppiumDriver(new URL(<remote-url>), ...);
in my test code.

Also had to change:
On the MAC I had to change the Server Address in Appiums general Settings tab: from 127.0.0.1 to the actual ip-address of the MAC machine


How to run appium cross-platform UI tests on CI
#4

Still don’t understand what the “Use Remote Server” option is for (in the General Settings tab) then…???


#5

@Alex, You can use selenium grid feature with appium. to do so you need to run appium on MAC device eventually that will be registred on selenium hub (window machine).

Window machine (Run as selenium hub) <----> Appium servers (Running on MAC, with nodeconfig).

Selenium grid: https://code.google.com/p/selenium/wiki/Grid2

Running Appium with nodeconfig : http://appium.io/slate/en/master/?java#advanced-concepts

Thanks,
Priyank Shah


#6

Hi @drapostolos
If local and remote machine are windows then same step I need to follow ?


#7

I haven’t tried, but I guess it’s the same procedure.

/Alex


#8

I too have same scenario.

Tests on windows machine.
Appium server on mac machine.

Can you please tell me how do i provide url/ ip address of my mac into appium ?

In Appium app, if i provide ip address of my mac and try to check “Remote Server” option and open inspector, it says “Could not launch appium server”


#9

I hope You might have found an answer by now…but for others i am mentioning here:

You can add capability in your script like:
driver = new RemoteWebDriver(new Uri(“http://123.20.38.134:4723/wd/hub”), capabilities);

Here ‘123.20.38.134’ is the ip of your machine where Appium server is running. You dont have to check Remove server checkbox.


#10

Im getting bad App Error when trying to run my script from my windows PC and appium server running on a Mac, any help somebody?


#11

Hi,

I am getting UnreachableBrowserException and ConnectException when I tried to run appium test scripts on remote windows machine.I have followed the below steps.

Steps:

  1. I have given remote windows machine IP address in Appium general settings.
  2. Starting Appium server on the remote windows machine

Please tell me if anything I missed and is there any firewalls blocking test execution.
Please help me any one on the same Thanks in advance.


#12

Check if you are able to ping remote machine.
If yes then it should work