< Previous | Next >

Lesson 2: Preparing the application under test for testing

In this lesson, you learn how to instrument the application under test (AUT). During this process, you also add the AUT to the test workbench and install the AUT on one or more devices, including the devices of other team members.

Before you start this lesson, verify that the following requirements are met:

If you meet these requirements, you can instrument the AUT and install it on iOS device, or you can deliver the AUT to other team members for testing. If you do not have a Macintosh computer and the source code for the AUT, proceed to Lesson 3: Installing an instrumented application on an iOS device, where you will learn how to install an application that was instrumented by someone else.

To prepare the AUT for testing:

  1. On a Macintosh computer, download the RTW-iOS-Build-Archive.zip build archive.

    The build archive contains scripts that are needed to prepare the application for testing.

    1. Open a browser window on the Macintosh computer and enter the Workbench URL in the following format:

      http://Workbench_URL:port/mobile

      For example, enter http://192.0.2.24:7878/mobile

    2. In the Rational® Test Workbench - Mac OS Welcome page, follow the online instructions to download the archive.
    3. When the download is complete, unpack the build archive.

      The following folders are included in the build archive: browser, build-script, client, runtime, runtime-bundle

  2. Instrument the AUT by running the rtwBuildXcode.sh script and specifying on the command line both the Workbench URL and the device option.

    You can specify the Workbench URL of your own computer to add the instrumented AUT to your test workbench, or you can specify the Workbench URL of another team member to add the instrumented AUT to their test workbench. With the device option, you can install the instrumented AUT on any USB-connected device.

    The rtwBuildXcode.sh script provides support for both Xcode projects and Xcode workspaces.

    Note: You must have the appropriate permissions to run the script. If necessary, run the chmod command to change permissions.
    1. On the Macintosh computer, open the Macintosh Terminal application.
    2. Type the following command to instrument the AUT and send it to the test workbench as an incoming application and to a USB-connected device.
      unpack_dir/build-script/rtwBuildXcode.sh .xcodeproj file Workbench URL device

      Here is an example of the command line syntax to instrument an AUT named UICatalog and send it to the test workbench and to all USB-connected devices:

      ./rtwBuildXcode.sh /Users/mario/iOSApps/UICatalog/UICatalog.xcodeproj/ http://9.54.119.136:7878 device

      Alternatively, you can use the simu option to send the AUT to an iOS Simulator, or the both option to send the AUT to all USB-connected devices and to an iOS Simulator.

      Note: If you did not use the device option with the rtwBuildXcode.sh script, you can still add the instrumented version of the AUT to a mobile device later.

      After the script completes, the instrumented AUT is visible in the Mobile and Web UI applications window, as shown below:

      Mobile and Web UI applications window
  3. Add the instrumented version of the AUT to a project in the test workbench.

    Incoming applications must be managed to be used in a test, that is, they must be added to a Test Workbench project in the Rational Test Workbench Eclipse Client. After you run the rtwBuildXcode.sh shell-script, do one of the following tasks to manage the application:

    • Click the incoming application button in the test workbench.
    • In the Test Navigator, right-click an incoming application under Mobile Incoming Applications and click Generate Managed Application.
After you complete these steps, you can start recording a test.

Lesson checkpoint

In this lesson, you learned how to instrument an iOS application, add it to the test workbench, and install it on a device. You learned that you can add the AUT to your own test workbench or to the test workbench of a team member.
< Previous | Next >

Feedback