Related Resources

Our Services

You May Also Like

Mobile testing with Ranorex (Android and IOS)

Janvi B Bhuva

Dec 06, 2019

9 min readLast Updated Nov 07, 2023

Supported devices

  • Ranorex Studio supports Android and iOS mobile devices.

For mobile testing, it is necessary that you should connect the device via USB (recommended) or WiFi with the computer that has Ranorex installed.

To have the test automation for Android and iOS, the device should have the Ranorex automation libraries for mobile testing corresponding to the Ranorex version installed.

Mobile tests in Ranorex Studio can be done in following simple steps:

  1. Device setting (Android and iOS).
  2. Connecting the mobile device via WiFi or USB.
  3. Instrumenting the APP.
  4. Creating the test for Mobile devices.
  5. Running the test and generating reports.

Prepare the Device:

Android Device

  1. Go to device setting and switch on Developers Mode.
  2. Activate Stay awake from the developer’s option.
  3. In the Developer options, enable USB debugging to allow the device to connect with the USB cable.
  4. Ensure that the device is connected to a power source at all times during test creation and execution.

IOS Device

  1. Go to device setting and set Auto-lock to never from Display and Brightness.
  2. Ensure that the device is connected to a power source at all times during test creation and execution.

Install the Ranorex Service APP:

To create and run the mobile test on your mobile device, it is necessary to have the Ranorex Service APP installed on your device. To install the Ranorex service APP scan the below QR code or go to https://www.ranorex.com/mobile-download-archive/ to download the Ranorex Service APP.

The page provides the links for the different Ranorex version and you can download the service APP for the Android and iOS according to the Ranorex studio installed in the computer.

Ranorex service APP for Android

  1. Tap on the download link for the service APP.
       - Service App: Service App 2.1.0
  2. Allow and confirm the security dialog.
  3. If the chrome blocks the installation of the APP, go to setting and allow install the APP from the unknown source.
  4. Android device is now ready to connect to the Ranorex studio.

Ranorex service APP for iOS:

  1. Tap on the download link for the service APP.
       - Service App: RxServiceApp Distributable 3.0.3
  2. Confirm the installation alert.
  3. On successful installation, APP appears on the home screen.
  4. On opening, the APP shows the message for “Untrusted Enterprise Developer” as it is not installed from the APP store. For that, go to setting > General > Profile and Device Management and trust “Ranorex GmbH” and it will be verified.
  5. iOS device is now ready to connect to the Ranorex studio.

Prerequisites for the Mobile test:

  1. Install iTunes to connect your iOS device to your computer via USB.
  2. When connecting via WiFi, the mobile device must be in the same network as the computer.
  3. When connecting via USB, avoid USB hubs. Always use your computers integrated USB ports if possible.

Add Endpoints:

  1. Go to view menu and Endpoints option to add the Endpoints which will open the
  2. Click on Add Endpoints button from the sidebar.
  3. Select the device type to want to add (Android, iOS, Web driver).
  4. Select the device from the list given and if the connected device is not visible refresh and then select the device.
  5. Click on Add Endpoint.
  6. On successfully adding the device will show the device with the details in the Endpoint list.

Instrumenting the Android APP:

Before instrumenting the APP you should make sure that you are able to access the APK from the computer on which the Ranorex studio is installed. Download the APK and place it in the folder.

Connect the device to the computer on which Ranorex is installed and start the Ranorex service APP on the device. You can instrument and deploy the APP on the mobile device with the instrumentation Wizard and for that, you must connect the mobile device to a computer via USB.

Steps to Instrument Android APP:

Step 1. Start Instrumentation and deploy APP wizard by clicking on the menu icon given beside the connected device and confirm windows security alert.

Step 2. Select the Android on the Ranorex Instrumentation Wizard.

Step 3. On click of the next will take you to the screen which allows browsing the folder that contains APK.

Step 4. Select the mobile device from the list of available devices or open the endpoint list to select a mobile device.

Step 5. Click on the next to start the instrumentation process and it may take several minutes to deploy and install the APP.

Step 6. Once the APP has been installed successfully the APP will be visible in the Ranorex Service APP and also on the device home screen. Also in the Ranorex Studio, you can see the APP appears for the selection when creating a mobile test.

Instrumenting the iOS APP:

You cannot instrument the APP that has been downloaded from the APP store or the test flight. Instrumenting the iOS APP means to combine the APP with a Ranorex library and compiling it and then the APP needs to be signed with a P12 certificate and the proper provisional profile. There are two ways to instrument the iOS apps. One is using Ranorex Instrumentation Wizard and the other is manual instrumentation of the source code with Xcode.

To instrument the iOS APP you need the IPA file and the linked P12 certificate and the password, and proper mobile provisioning profile file. Before instrumenting the APP you should make sure that you are able to access the APK from the computer on which the Ranorex studio is installed. Download the APK and place it in the folder. Connect the device to the computer on which Ranorex is installed and start the Ranorex service APP on the device. You can instrument and deploy the APP on the mobile device with the instrumentation Wizard and for that, you must connect the mobile device to a computer via USB. In preparations for the Instrumentation process, we will store the IPA, the P12 certificate and the mobile provisioning profile in the folder on the computer Ranorex studio is installed.

Steps to Instrument iOS APP:

Step 1. Start Instrumentation and deploy APP wizard by clicking on the menu icon given beside the connected device and confirm windows security alert.

Step 2. Select the iOS on the Ranorex Instrumentation Wizard.

Step 3. On click of the next will take you to the screen which allows you to select the action you want to perform and without any change in the default setting “Instrument & deploy custom IPA” click on Next which will instrument and deploy the app to the mobile device.

Step 4. On click of the next will allow you to browse the IPA from the folder that contains the IPA and for the advance, setting click on the Settings button and specify the P12 file and the password for the P12 file and the mobile provisioning profile.

Step 5. elect the mobile device from the list of the available devices.

Step 6. Click on the next to start the instrumentation process and it may take several minutes to deploy and install the APP.

Step 7. Once the APP has been installed successfully the APP will be visible in the Ranorex Service APP and also on the device home screen. Also in the Ranorex Studio, you can see the APP appears for the selection when creating a mobile test.

Create a Mobile Test:

To create a mobile test, you can use the RocketStart Wizard on the start page and click on the New solution using a wizard or from the File menu, choose to create a new solution using Solution wizard or using the keyboard shortcut key Ctrl+Shift+N Choose Mobile from the solution wizard and mention the name of the solution and the location where you want to save the solution. Select the type of application you want to create the test for and on completing setup required for creating the solution the screen that will appear looks like below.

Test suite view:

This is the test suite view where you can manage your tests. By default on creating the solution, the test suite contains a test case with one empty recording module. The symbol for the Mobile test cases is different compared to the normal recording module. It shows the symbol of Mobile which specifies it is a mobile recording module and suitable only for creating mobile tests. All the recording modules you create in this solution will be a mobile recording module.

Recording Module view:

Recording the Mobile test is different compared to desktop or web tests. Click on the Record button to record the test. There appears a dialog for selecting the mobile device that is connected as endpoints and the list of instrumented APP. Select your device and the APP from the dialog. If you choose WEB also provide a URL for the mobile web test.

Click on the create button on the dialog to start recording the mobile test and Ranorex studio will automatically start the selected APP on the mobile device and add the respective action in the action table.

Ranorex Spy starts automatically to track the UI elements of the instrumented mobile APP. The element browser in the Spy shows all the UI elements of the instrumented APP and also the screen of the Mobile APP where you can tap and track the UI element.

Recording Mobile test consists of two sequential and iterative steps:

  1. Tap-Track-Add
  2. Drag-Drop-Define

Tap: Tap on the mobile screen visible in the Element Browser and make it visible.

Track: Update the tracked element by click on Refresh.

Add: Select the element in the element tree, right-click and select add to the repository.

Drag: From the repository, drag the item to the desired location in the action table.

Drop: Drop it in the action table and select the desired action from the drop-down.

Define: Make needed configurations to the action, e.g. setting timeouts, the content of the key sequence, delays, etc.

Also, you can shorten the procedure for the iterative steps by directly dragging a UI element from the Spy to the action table.

Run a Mobile Test:

To run the Mobile test make sure that the device on which you want to run the test must be set as an automation root in the Endpoints pad else you can specify an endpoint in the Run mobile APP action in the action table.

Run the Mobile Test:

In the test suite, click on RUN which will execute and run the test on the mobile device. While the test is running on the device do not touch the screen or the button on the device which will lead to the test failure.

Report:

Once the test run is completed the test report will be generated and appears on the separate tab with the details like the endpoint where the test was run, Execution time, Operating system, Screen dimensions, OS Language, Duration taken to execute the test run, Total error, and warnings.

· · · ·

Third Rock Techkno is a leading IT services company. We are a top-ranked web, voice and mobile app development company with over 10 years of experience. Client success forms the core of our value system.

We have expertise in the latest technologies including angular, react native, iOs, Android and more. Third Rock Techkno has developed smart, scalable and innovative solutions for clients across a host of industries.

Our team of dedicated developers combine their knowledge and skills to develop and deliver web and mobile apps that boost business and increase output for our clients.

Hire Android developers from Third Rock Techkno for your dream project to turn your vision into reality in the most cost-effective way. We provide flexible work schedules, systematic reporting, and progress tracking.

Projects Completed till now.

Discover how we can help your business grow.

"Third Rock Techkno's work integrates complex frameworks and features to offer everything researchers need. They are open-minded and worked smoothly with the academic subject matter."

- Dr Daniel T. Michaels, NINS