KilloWatt KilloWatt - 1 year ago 94
iOS Question

Using Selenium with ios-driver to test iOS mobile apps from a Windows machine

I am investigating the feasibility of testing native, hybrid, and web-based applications using Selenium for Windows (web only), Android, and iOS mobile devices (e.g. iPad).

The ideal setup for a tester would be a Windows machine with physical devices connected via USB. This works with Android as all that is needed (excluding the ADK and USB driver setup) is Selendroid's stand-alone server and a JAR dependency. However, from my understanding, this is not possible with iOS mobile devices using ios-driver. I have also checked out Appium, and they too state that a Mac computer would be needed to test iOS devices.

So that brings us to my question: Is there a way to test iOS mobile apps (web, hybrid, native) from a Windows machine?

Here is a list of preferences:

- Use Selenium and other Selenium-compatible plug-ins

- Run tests from Windows machine

- Cannot use iOS VM

- Cannot use Mac machine with "middle-man" application to communicate with Windows machine

- Have to test physical mobile devices

- No "hacks" (e.g. Jailbreaking)

It is also safe to assume that I have no experience developing iOS applications.

Answer Source

It is possible to run the tests from a windows machine but not the way you are probably thinking. You will still need a mac. Here are the requirements:

  1. A mac on your network with Appium server running
  2. Has Appium environment installed properly
  3. Has the .app on the machine

If you have these three reqirements fulfilled and there is no firewall blocking network access to the mac then you can do it. You will have to actual tests on the windows machine but instead of specifying in the setup method as the IP address of Appium server you will replace it with this: yourmacsipaddress:8080 and this should execute the test properly.

Remember that you have to specify the path of the .app in the test which is running from your windows machine. But the catch is that the path has to be the path of the .app in the mac and not on your windows machine.

So the tests will run from your Windows machine but the installation of the app, the automation, and the testing will be done on the mac but you will get the "pass" or "fail" update on your Windows machine.

Hope this helps. Happy automating :)

P.S. Please up vote this answer if it helped

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download