Recording tests from the Android mobile test client

Mobile tests are typically created by recording a session on the mobile device or simulator that runs the app being tested. At the end of the recording session, you close the app and the recorded session is uploaded to Rational® Functional Tester, where it is used to generate a test.

About this task

With the mobile test client for Android, you can record all actions on the user interface (UI), plus some actions on the phone itself: GPS locations, volume up and down, mute, headphones connect and disconnect, and all media actions (play, pause, and so on), call, and end call. Camera and microphone functions are not supported.

Procedure

To record a session on the mobile device:
  1. In the mobile test client, tap Manage Applications for a native application or Manage Web Applications for a web application. In the mobile test client, tap Manage Web Applications. The first time you tap Manage Web Applications, a message shows up and asks if you want to install the mobile web recorder. Tap Install and when the installation is complete, tap Done.
  2. Tap an app in the list and tap Record.
    Note: If your device or emulator does not have silent mode, the mobile test client uninstalls the original version of the application under test and replaces it with the recording-ready app (instrumented version of your application).
    To make the silent mode option available on a pre-4.2 device without the USB Controller, you must use the following instructions. Connect the device with a computer that has the Android SDK installed. Use an USB cable and enable USB debugging. Ensure that you installed the appropriate USB driver. Next, open the command prompt on the computer and run the following commands:
    • adb devices: Lists the devices connected to the computer by the USB cable.
    • adb tcpip 5555: Makes the silent mode option available on the device.
    You must follow these steps every time you reboot your device.

    Without the USB Controller, silent mode is not available on devices and emulators with API level 17 and above (Android 4.2 +) due to a known limitation

  3. When the app starts, interact with the device.
    All your actions on the device and responses from the app are recorded.
  4. To end the recording, close the app, switch to another app, or tap the Home button.
    The recording is uploaded to Rational® Functional Tester. Depending on the size of the recording, the upload might take a few seconds to several minutes. Recordings are displayed in the test navigator under Mobile Incoming Recordings with a name and a timestamp.
    Note: If your session involves switching between apps, including multiple apps, a new recording is uploaded each time you switch apps. This action produces multiple recording logs in the Mobile Incoming Recordings folder. You can combine these multiple recordings to generate a single test.
  5. In the Test Navigator, expand Mobile Incoming Recordings, right-click a recording, and select Generate Test. Alternatively, click the link in the message that warns you that there is a new incoming recording.
    The New Test from Incoming Recordings window opens.
  6. Select a project folder and a name for the new test.
    If necessary, you can click New > Test Workbench Project to create a new project folder.
  7. Optional: If you want to generate a test with multiple recordings (for example, if your session involves switching between multiple apps), click Next and select the recordings that you want to use to generate the test.
  8. Click Finish and Open test.
    The test editor opens in Rational® Functional Tester and displays the generated test.

What to do next

When the test is generated, you can edit the test in the test editor. For more information, see Editing mobile tests.