iOS Mobile Testing via Custom Endpoint


Testing on a wide range of devices - including mobile devices - is essential to ensuring that your web pages or applications work flawlessly. However, functional testing on mobile devices has been a notoriously difficult task to automate ever since the smartphones and tablets first gained popularity.

Ranorex Webtestit saves the day by making it easy to set up and run tests on different mobile devices. In this article, we’ll explain the process of running your tests on iOS devices.

As many of you already know, Ranorex Webtestit enables you to use resources from Sauce Labs for remote test execution.
What many probably don’t know is that Sauce Labs can also be used to help you execute your tests on a wide range of iOS and Android mobile devices via Custom Endpoint in Ranorex Webtestit.

Here’s how.

First, you need to have a Sauce Labs account. Registering an account is required in order to integrate Sauce Labs into your testing workflow. You will get a username and a secret access key to use in the tests.

To find your access key, log in to Sauce Labs and do the following:

  1. When on Sauce Labs Dashboard, click your name in the Account Profile menu in the upper-right corner
  2. Click on User Settings
  3. Click on Access Key (it will be copied to the clipboard automatically)

Open Ranorex Webtestit and create your test. When adding an endpoint, select Custom Endpoint.

In URL field add:

http:// USERNAME:[email protected]:80/wd/hub

Replace USERNAME and ACCESS_KEY with your actual Sauce Labs credentials.

You also need to add desired capabilities in order for your test to work.

Sauce Labs come back to the rescue with their amazing Platform Configurator.
Here we can choose API, device, operating system, and browser we want to use, and the Sauce Labs Platform Configurator will generate the code we’ll place in the Capabilities field.

Since this is mobile testing, you need to choose Appium, an open source mobile-automation framework that uses an extension of Selenium WebDriver framework to build mobile tests.

From the Device drop-down menu, select one of the devices in the iOS Simulator tab.


Next, choose the version of iOS and version of Appium. Finally, check the Web Testing.

You’ll see the Java code generated like this:

However, some edits are required to make this code work in Ranorex Webtestit.
Here’s how the code should look when placed in Capabilities field:

  "appiumVersion": "1.13.0",
  "deviceName": "iPhone 6s Simulator",
  "deviceOrientation": "portrait",
  "platformVersion": "12.2",
  "platformName": "iOS",
  "browserName": "Safari"

This is how Custom Endpoint dialogue should look like before the test execution.

When you run your test in Ranorex Webtestit, you’ll be able to track the progress in the Sauce Labs dashboard where you’ll be allowed to view how your test execution looks on a simulated device.
Here, we created a simple test that opened a Google page on an iPhone 6s Simulator.

After the test is finished, Sauce Labs would generate a video report just like in case when being used for remote test execution. You’d also be able to see the report in Ranorex Webtestit.

As you could see, the iOS mobile testing could be effortless thanks to Ranorex Webtestit and its integration with Sauce Labs.

Running tests on iOS devices is also possible using Ranorex Webtestit and Browserstack, as described in this article.

Running tests on iPhone and iPad devices using BrowserStack