< Previous | Next >

Lesson 1: Setting up the test environment

In this lesson, you learn how to set up the test environment on an Apple Macintosh or Windows computer for testing native iOS apps.

Before you can create tests, you must set up the test environment.

  1. 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 Settings > General > Profiles.
  2. 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.
  3. 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.

  4. 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.
  5. 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.
  6. If you have not already done so, start the test workbench on an Apple Macintosh or Windows computer.
  7. When prompted, select an existing workspace or create a new one. The test workbench stores projects in a folder called a workspace.
  8. 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:

    Test Workbench, initial view

  9. From the test workbench, select a test project for the AUT or create a Test Workbench project by clicking File > New > Test Workbench Project.
  10. Click the Display available mobile devices icon Display available mobile devices to open the Mobile Devices editor as shown below:

    Mobile Devices editor

  11. 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.

  12. In the test workbench, find the Workbench URL by clicking the Display Workbench URL icon Display Workbench URL, as shown below:

    Display Workbench URL

    You will need the Workbench URL to connect the mobile devices to the test workbench.

  13. In the Mobile Devices editor, click the Add device to list iconAdd device to list. A window displays a list of workbench URLs and a QR code that contains the selected URL from the list.
  14. 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:

    Mobile test client

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

    iPhone connected to workbench

Lesson checkpoint

In this lesson, you learned the prerequisites for testing and installed the IBM Rational Test Workbench Eclipse Client. You verified that you have an Apple Developer or Enterprise license. If you are a developer with a Macintosh computer, you verified that you have Xcode installed. You learned how to start the test workbench and how to connect an iOS device to the test workbench.
< Previous | Next >

Feedback