You can test native, hybrid, and 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.
Before you begin
Note the following requirements:
- You will need an Apple Developer or Enterprise License with a
provisioning profile for each mobile device.
- To record and play back tests of a native or hybrid iOS application,
you will need a managed version of the application under test (AUT).
If this is not available, you will need to instrument the AUT on a
Macintosh computer that contains the Xcode source project for the
AUT. A Macintosh computer is not required for testing web applications.
Note: Xcode is the Apple integrated development environment (IDE)
used for developing Macintosh and iOS applications. You can download
Apple Xcode from the
Xcode Dowloads
and Resources web site or from the Apple App Store on a Macintosh
computer.
About this task
The following diagram shows a high-level overview of mobile
testing for iOS applications:
Procedure
- Install IBM® Rational® Test Workbench Mobile Test Edition on a Windows or Linux computer and ensure that Extension for Mobile is selected. For details,
see Installing the product software.
- From the test workbench,
create a test project by clicking .
- If you need to build and instrument a native or hybrid
iOS app for testing, proceed as follows:
- Download the build archive on to a Macintosh computer.
- Run rtwBuildXcode.sh to instrument
the AUT and send it to the test workbench as an incoming
application.
For details, see Instrumenting iOS applications.
- If you are testing web applications, download the IBM Rational Test Workbench Mobile
Web Recorder from
the Apple App Store on to your mobile device.
The mobile web recorder 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.
- In the test workbench add
the application under test as a managed, instrumented application.
For details, see Importing applications to test in the workbench and Adding web applications to test workbench.
- For testing native and hybrid applications, open the mobile test client in a browser
on your device and add
the managed, instrumented AUT on the device.
- Create a test by recording gestures and interactions on
the device. Actions are represented in natural language, which allows
you to document and reproduce the test manually.
- Examine and enhance the test script recording as needed.
Here is a partial list of what you can do:
- Explore controls and context menus to customize the script
to your needs.
- Add stubs to simulate the behavior of actual objects that
interact with the AUT.
- Add verification points to verify that an expected value or
behavior is returned during a test run.
- Add variables to the test script.
- Run the test on the iOS device or in the test workbench.
- Evaluate the test results.