< Previous | Next >

Lesson 5: Running the test and evaluating the results

When you play back a recorded test, the test runs on the iOS device. However, you can initiate test execution from several places: from the iOS device, from the test workbench, from the command line, and from IBM® Rational® Quality Manager. This lesson focuses on initiating test execution from the device and from the test workbench.

Note: To prevent the iOS device from disconnecting frequently from the test workbench, go to Settings > General on the iOS device and turn Auto-Lock to Never.

To initiate test execution from the iOS device:

  1. If the device is in passive mode, tap Back from the Passive Mode display to return the device to Active Mode.
  2. If the device is no longer connected to the test workbench, reconnect as described in Lesson 1: Setting up the test environment. You can connect either by typing the Workbench URL in a browser or by using a QR code scanner to scan the Workbench URL.
  3. On the device, tap Manage Applications, and then tap the application under test, for example, UICatalog.

    A list of available tests is displayed, as shown below:

  4. Tap the test that you created in Lesson 4: Recording a test.
  5. Tap Run Test. Do not use the device until the test run is complete.

    You can watch the recorded test as it plays back on the iOS device. During test execution, the Mobile Devices window in the test workbench shows that a test is running on the iOS device.

    Mobile device with test running

    When test execution is complete, you can view the results in the Mobile and Web UI Results folder in the Test Navigator. See Initiating test execution from the test workbench for details about test reports.

    Note: If a test fails on a particular step, you can temporarily comment out the step and run the test again. To comment out a step, right-click the step in the Test Contents window of the test editor and click Disable.

Initiating test execution from the test workbench

You can also start a test run from the test workbench. In this case, a live report is displayed in the test workbench as the test runs, showing each step as it is run.
  1. On the iOS device, open the Safari or Chrome browser and connect to the test workbench as described in Lesson 1: Setting up the test environment. You can connect either by typing the Workbench URL or by using a QR code scanner to scan the Workbench URL.

    The mobile test client opens in the browser:

    Mobile test client

  2. Tap Enter passive mode to hand over control to the test workbench.

    A message is displayed, indicating that the iOS device is in passive mode and that you can exit passive mode by tapping Back.

  3. In the test workbench, open the test that you created in Lesson 4: Recording a test. If the test is not already open, double-click the test in the Test Navigator to view the test in the test editor.
  4. Click Run Test in the upper right corner of the test editor, just above User Action Details.

    The Run Configuration window opens. If no iOS device is currently connected to the test workbench, Run Configuration will display errors, as shown below:

    Run Configuration window

  5. If no iOS device is connected, select an iOS device in the Run using column.

    The Run Configuration window is refreshed, showing the connected iOS device.

    Run Configuration window with device selected

  6. Click Finish.

    After code is generated, you can watch as the recorded test plays back on the iOS device and a live report is displayed step-by-step in the test workbench, as shown below: When test execution is complete, you can view test reports and the test log viewer. Reports are saved in the Results folder in the Test Navigator.

    Live report

    The report displays the name and location of the test, the test execution status, the application under test, the duration of the test, and each step in the test. You can view the report later by double-clicking the report in the Results folder in the Test Navigator.

    Test results
  7. To view the Test Log, right-click the test results in the Result folder, and click Display Test Log.
After test execution is complete and you have viewed the reports, you can proceed to the next lesson where you will add a verification point to the test.

Lesson checkpoint

In this lesson, you learned about running tests and viewing test results.
In this lesson, you learned how to do the following tasks:
  • Put an iOS device into passive mode so test execution is controlled by the test workbench
  • Run a test from an iOS device
  • Run a test from the test workbench
  • View a live report
  • View a statistical report
  • View the test log
< Previous | Next >

Feedback