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 HCL OneTest™ UI, where it is used to generate a test.
About this task
Procedure
To record a session on the mobile device:
- 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.
-
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.
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
-
When the app starts, interact with the device.
All your actions on the device and responses from the app are recorded.
-
To end the recording, close the app, switch to another
app, or tap the Home button.
The recording is uploaded to HCL OneTest™ UI. 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.
-
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.
-
Select a project folder and a name for the new
test.
If necessary, you can clickto create a new project folder.
- 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.
-
Click Finish and Open test.
The test editor opens in HCL OneTest™ UI and displays the generated test.