Testing Web applications on iOS Simulators: overview

With HCL OneTest™ UI for iOS you can test mobile web applications. From the iOS Simulator you can connect to HCL OneTest UI, record and run tests, and view reports. You can install the HCL OneTest UI on a Windows, Apple Macintosh, or Linux computer.

Testing on an iOS Simulator

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.

You can also do your testing using the Safari browser in the iOS Simulator. This client is a web application that runs in the Safari browser on your Simulator. To run the client, simply type the Workbench URL in the following format in a browser on your Simulator:

Format: http://Workbench_URL:port/mobile


The following figure shows the mobile test client for testing web applications in a browser on an iOS Simulator:

Mobile Client

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 Simulator.
  • 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 instance of HCL OneTest UI.

Enabling pop-up windows

When using the mobile test client on an iOS Simulator, be sure to enable pop-up windows. Pop-up windows must be allowed for the IP address of the computer running HCL OneTest UI . Safari silently disables pop-up windows. For every device-specific operation (install, record, playback), Safari prompts with a pop-up confirmation.

Passive mode

When you are ready to run your tests, you can initiate the test run from the Simulator or from HCL OneTest UI. In either case, the test actually runs on the device. To give control to HCL OneTest UI, simply tap Enter Passive Mode on the mobile test client.

Passive mode behavior is browser-specific. Safari is more restrictive and displays multiple passive mode confirmation dialog boxes.

Differentiating among multiple devices

When you connect a particular Simulator, such as an iPhone, to HCL OneTest UI, you can view the connection in the Mobile Devices editor in HCL OneTest UI.

To differentiate among multiple, connected iPhones, you can change the Device Description.

  1. On the device, open Safari and browse to the Workbench URL.

    This opens the mobile test client.

  2. Tap About.
  3. Type the new label in the Device Description field.
  4. Click Register.

You can see the result in the following figures:

Table 1.
Before After

Default Device Description

Modified Device Description

Test Workbench Web Recorder

The Test Workbench 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. Download the Test Workbench Web Recorder. For more information, see Installing the mobile web recorder on the iOS Simulator. When you are done testing, you can stop the recorder using the standard Apple Activity Monitor.