This page is maintained for older versions of Rapise only. The latest documentation can be found at: https://rapisedoc.inflectra.com
Mobile Testing

 

Purpose

 

Rapise lets you record and play automated tests against native applications on a variety of mobile devices using either Apple iOS or Android. Rapise gives you the flexibility to test your applications on either real or simulated devices.

 

This section explains how to setup your environment for mobile testing, once that is done, you can the go to the section that explains the process for using Rapise to actually perform mobile testing.

 

Rapise uses a third-party open-source tool called Appium (http://appium.io) that is used to actually host the mobile devices and Rapise essentially communicates to the device via. Appium:

 

mobile_architecture_android_device

 

Testing Architectures

 

Rapise runs on Windows computers (PC) and Android devices (both real and simulated) can be tested on either an Apple Macintosh (Mac) computer or a PC. Conversely, iOS devices (both real and simulated) can only be tested on an Apple Macintosh (Mac) computer. So this means that there are three separate possible testing environments that you may need to setup:

 

·Using a Mac to Host iOS Devices. It will be necessary to install Appium and Apple Xcode onto the Mac and connect to Appium over the network from Rapise running on your PC.
 

·Using a Mac to Host Android Devices. It will be necessary to install Appium and Android Studio onto the Mac and connect to Appium over the network from Rapise running on your PC.
 

·Using a PC to Host Android Devices. You can either install Appium and Android Studio onto a separate PC or you can simply use the same PC that is running Rapise. The only difference will be whether the URL used to connect to Appium is a localhost URL or one pointing to the other PC.

 

The steps for setting each of these will be described separately below:

 

1) Using a Mac to Host iOS Devices

 

The first thing you need to do is install Xcode from the Apple Mac app store. Make sure you include the iOS SDK, and also the iOS Simulator if you intend to test simulated iOS devices.

 

mobile_setup_apple_xcode

 

(Please refer to the Apple tutorial https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/ if you are writing your first iOS application and need an introduction into how to develop for iOS).

 

Since configuring Xcode to build and deploy an application to a physical or simulated iOS device is quite involved, we have created a separate topic that explains the process.

 

Once you have the iOS environment configured, you need to do is go to the Appium website (http://appium.io) and install the latest version of Appium. Once it is installed, you need to select the option for iOS and click the Play button to start the Appium server:

 

mobile_setup_appium_mac_ios

 

You are now ready to start mobile testing of your iOS device.

 

2) Using a Mac to Host Android Devices

 

The first thing you need to do is go to the Appium website (http://appium.io) and install the latest version of Appium. Once it is installed, you need to select the option for Android and click the Play button to start the Appium server:

 

mobile_setup_appium_mac_android

 

Once that is installed, you will then need to download and install the latest version of Java SE Development Kit (JDK) from the Oracle website (http://www.oracle.com/technetwork/java/javase/downloads/index.html). Once that has been installed, make sure that the JAVA_HOME environment variable has been set.

 

Once that is installed, you will then need to install the Android SDK (you may already have it installed if you are doing Android development). You can download it from: https://developer.android.com/sdk.

 

Once it has installed, you will use the Android SDK Manager to download and install the necessary packages:

 

android_sdk_manager_mac

 

If you are going to be testing a physical Android device, you will need to do the following:

 

1.Make sure you have enabled Developer mode in the Android device itself:

a.Open Settings> About on your Android phone or tablet.

b.If you have a Samsung Galaxy S4, Note 8.0, Tab 3  or any other Galaxy device with Android 4.2, open Settings> More tab> About and tap it.

c.If you have Galaxy Note 3 or any Galaxy device with Android 4.3, go to Galaxy Note 3 from Settings> General> About and tap the Build version 7 times.

d.Now scroll to Build number and tap it 7  times.

e.After tapping the Build Number 7 times, you will see a message �You are now a developer!� If you have a Galaxy S4 or any other Samsung Galaxy device with Android 4.2, the message reads as follows- �Developer mode has been enabled�.

 

Now when you try and connect to the device using the Rapise mobile spy, you may get the following message:

 

mobile_setup_android_home_env_variable

 

This means you need to use a MacOS X Shell window to add a environment variable called ANDROID_HOME and set it to the path of the installed Android SDK (typically something like /Users/my.user/Downloads/android-sdk-macosx).

 

If you want to test using the Android simulator,make sure you have installed it using the SDK manager. Then you can launch (from the main menu of the Android SDK Manager) the Android Virtual Device (AVD) Manager:

 

android_virtual_device_manager_mac

 

In this case you can just create the Android Virtual Device, Start it and then connect to it using Rapise.

 

You are now ready to start mobile testing of your Android device.

 

3) Using a PC to Host Android Devices

 

The first thing you need to do is go to the Appium website (http://appium.io) and install the latest version of Appium. Once it is installed, you can start it up and click the Play button to start the Appium server:

 

mobile_setup_appium_pc

 

Once that is installed, you will then need to download and install the latest version of Java SE Development Kit (JDK) from the Oracle website (http://www.oracle.com/technetwork/java/javase/downloads/index.html). Once that has been installed, make sure that the JAVA_HOME environment variable has been set.

 

Once that is installed, you will then need to install the Android SDK (you may already have it installed if you are doing Android development). You can download it from: https://developer.android.com/sdk.

 

Once it has installed, you will use the Android SDK Manager to download and install the necessary packages:

 

android_sdk_manager_windows

 

If you are going to be testing a physical Android device, you will need to do the following:

 

2.Locate the Google Android USB drivers that came with the Android SDK (C:\Program Files (x86)\Android\android-sdk\extras\google\usb_driver) and when you connect your Android device to the PC, choose to install these drivers rather than the standard ones.
 

3.Make sure you have enabled Developer mode in the Android device itself:

a.Open Settings> About on your Android phone or tablet.

b.If you have a Samsung Galaxy S4, Note 8.0, Tab 3  or any other Galaxy device with Android 4.2, open Settings> More tab> About and tap it.

c.If you have Galaxy Note 3 or any Galaxy device with Android 4.3, go to Galaxy Note 3 from Settings> General> About and tap the Build version 7 times.

d.Now scroll to Build number and tap it 7  times.

e.After tapping the Build Number 7 times, you will see a message �You are now a developer!� If you have a Galaxy S4 or any other Samsung Galaxy device with Android 4.2, the message reads as follows- �Developer mode has been enabled�.

 

Now when you try and connect to the device using the Rapise mobile spy, you may get the following message:

 

mobile_setup_android_home_env_variable

 

This means you need to use the Windows control panel to add a System environment variable called ANDROID_HOME and set it to the path of the installed Android SDK (typically C:\Program Files (x86)\Android\android-sdk).

 

If you want to test using the Android simulator,make sure you have installed it using the SDK manager. Then you can launch (from the Windows Start Menu) the Android Virtual Device (AVD) Manager:

 

android_virtual_device_manager_windows

 

In this case you can just create the Android Virtual Device, Start it and then connect to it using Rapise.

 

You are now ready to start mobile testing of your Android device.

 

See Also

 

·Mobile Testing, for an overview of mobile testing with sub-sections on testing using iOS and Android.

·Mobile Testing Tutorial - for a simple introduction to mobile device testing.

·Mobile Settings Dialog - for information on setting up the different mobile profiles for the mobile devices you will be testing

·Mobile Object Spy - for information on how Rapise connects to the device and lets you view the objects in the application being tested

·Mobile Testing: iOS Setup - the steps for setting up Xcode and the iOS SDK for testing iOS devices