Testing Web applications on iOS devices: overview
Testing on an iOS device
You can test web applications on an iOS device using the browser-based client for iOS. This client is a web application that runs in the Safari or Chrome browser on your device. To run the client, simply type the Workbench URL in the following format in a browser on your device:
Format: http://Workbench_URL:port/mobile
Example: http://9.11.22.333:7878/mobile
The following figure shows the mobile test client for testing web applications in a browser on an iOS device:
Here are some important details about the browser-based client:
- The browser-based client can detect API information, device orientation, locale, and device type from the device.
Whenever an application under test is started. it opens as a URL in a new browser tab. The blank screen that is shown is actually a new tab and is shown temporarily before the launch.
Note: When using the browser-based client, be sure to clear the browser cache before connecting to another test workbench.
Testing with the iOS Simulator
You can also do your testing using the Safari browser in the iOS Simulator, or you can use the native mobile test client in the Simulator after following the installation instructions at Installing the mobile test client on the iOS Simulator. Chrome is not currently available on the iOS Simulator.
Enabling pop-up windows
When using the mobile test client on an iOS device, be sure to enable pop-up windows. Pop-up windows must be allowed for the Workbench IP address. Safari silently disables pop-up windows, while Google Chrome prompts you to allow pop up windows. For every device-specific operation (install, record, playback), Safari prompts with a pop-up confirmation. There are fewer messages with Chrome.
Passive mode
When you are ready to run your tests, you can initiate the test run from the device or the test workbench. In either case, the test actually runs on the device. To give control to the test workbench, simply tap Enter Passive Mode on the mobile test client.
Passive mode behavior is browser-specific. While Chrome operates in passive mode as expected. Safari is more restrictive and displays multiple passive mode confirmation dialog boxes.
Differentiating among multiple devices
When you connect a particular device, such as an iPhone, to the test workbench, you can view the connection in the Mobile Devices editor in the test workbench.
To differentiate among multiple iPhones that are connected to the test workbench, you can change the Device Description.
- On the device, open Safari or Chrome and browse to the Workbench URL.
This opens the mobile test client.
- Tap About.
- Type the new label in the Device Description field.
- Click Register.
You can see the result in the figures below.
Before | After |
---|---|
IBM Rational Test Workbench Mobile Web Recorder
The mobile web recorder is an iOS application that is required to record and play back user actions of a web application under test. It is invoked automatically during the recording and playback process. You can download the mobile web recorder from the Apple App Store. When you are done testing, you can stop the mobile web recorder using the standard Apple Activity Monitor.
Getting help and viewing videos
You can get help about mobile testing and access training videos by tapping Help from your mobile client.
- Simply tap Help from the Home screen of the mobile client.
- Then, tap Help again to view textual guidance or tap Videos on YouTube to go directly to the mobile testing playlist on YouTube, where you can choose from a list of training videos about mobile testing.
Support for the Swift programming language
Starting with version 8.7.1 of the test workbench, you can also test apps that were developed with the Swift programming language, in addition to apps that were developed with Objective -C.