Adding hardware actions in a test

You can add hardware actions to your test by using a physical widget to add an action in the test script. The hardware action that you can test for is the GPS fix that is supported by Android and iOS applications under test. For Android applications, you can test some more hardware actions such as the use of the volume up and down actions, muting, the use of headphones, all media actions (play, pause, and so on), making calls, and ending calls.

Before you begin

You must have created a test from a recording and have the test script open in the test editor. You can add hardware actions in the tests which are created from mobile or Web-based apps if the Web UI actions and elements for hybrid apps are activated. See Activating Web UI actions.

About this task

This action applies only to tests created from Android or iOS apps.

Procedure

  1. In the Rational® Test Workbench Mobile Test Edition, open a test script and in the Test Contents area, click the launch app node where the action is to be added.
  2. Click the insert push button and select Hardware action. Example: select GPS fix, and complete the longitude and latitude fields. Another way is to right-click the selection, or clicking Options > Insert in the test editor to select the menu item. The values are different for Web UI apps and Android apps.
  3. In the Test Element Details section, select an item in the list of object’s actions. You can enter a value for the timeout too. The new action is added before the script item that you had initially selected in the launch node.
  4. Save the test.

Feedback