In this lesson, you learn how to set up the test environment
on an Apple Macintosh or Windows computer
for testing native iOS apps.
- Obtain an Apple Developer or an Enterprise License with
a provisioning profile for each mobile device that you plan to use
for testing. To learn more about Apple licensing, see https://developer.apple.com/programs/start/ios/.
To verify that you have a provisioning profile, tap .
- Install IBM® Rational® Test Workbench Eclipse Client on a Macintosh or Windows computer and ensure that Rational Test Workbench Eclipse
Client and Rational Test Workbench Extension for Mobile are selected.
Note: Although
it is possible to run the test workbench on
a Linux computer, instructions
for the Linux operating system
are not provided in this tutorial.
- If you will be instrumenting the application under test
(AUT) yourself, install Xcode 4.6 or newer on a Macintosh computer
running OS X v10.8 Mountain Lion or newer.
Note: Before
you can test a native or hybrid mobile application, the application
must be instrumented. An instrumented application contains the application
under test augmented with code that allows you to record and play
back a test.
Xcode is required to instrument the AUT. If
you do not have a Macintosh computer with Xcode and the source code
for the AUT, skip this step. Lesson 2: Preparing the application under test for testing discusses
how a team member can add the instrumented AUT to another team member's
computer.
- Choose an iOS application to test. If you do not have one
of your own, you can download one of the sample applications from
Apple, such as the UICatalog application, from the Apple
Developer Library. Be sure to download an application that
is compatible with your version of iOS.
- Enable pop-up windows on the mobile devices that you plan
to use for testing. 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 you with a pop-up
confirmation. There are fewer messages with Chrome.
- If you have not already done so, start the test workbench on
an Apple Macintosh or Windows computer.
- When prompted, select an existing workspace or create a
new one. The test workbench stores
projects in a folder called a workspace.
- When the test workbench Welcome
page opens, click the Workbench icon to change to the Test Workbench view.
The Test Workbench view
opens as shown below:

- From the test workbench,
select a test project for the AUT or create a Test Workbench project
by clicking .
- Click the Display available mobile devices icon
to open the Mobile Devices editor
as shown below: 
- Attach one or more iOS devices to a Macintosh or Windows computer through the
USB port.
If you are going to instrument the AUT yourself,
attach the devices to a Macintosh computer. This allows you to install
the instrumented application on an iOS device at the end of the instrumentation
process. You can attach multiple, compatible iOS devices to the USB
ports. If you are working in the same location with team members who
do not have a Macintosh computer and the source code for the AUT,
you can install the instrumented AUT on their devices.
- In the test workbench,
find the Workbench URL by clicking the Display Workbench
URL icon
, as shown below: 
You
will need the Workbench URL to connect the mobile devices to the test workbench.
- In the Mobile Devices editor, click
the Add device to list icon
. A window displays a list of workbench
URLs and a QR code that contains the selected URL from the list.
- On the mobile device, open the mobile test client in a browser
by typing the full Workbench URL (http://IP_address:port/mobile),
for example, http://192.0.2.24:7878/mobile. Alternatively,
use a QR code scanner to scan the Workbench URL.
Note: If
the device fails to connect using the first URL in the list, try an
alternate URL. The Workbench URL includes the IP address, which can
vary depending on your location and network configuration.
The mobile test client opens in a browser
on the device:

Looking back at the test workbench,
you can now see that your iOS device is connected, as shown in the
following figure:
