Getting started with mobile application testing on Android devices

Use this topic to help you get started with your testing of applications that run on Android devices.

About this task

The following diagram shows a high-level overview of mobile testing for Android. In the diagram, test workbench refers to HCL OneTest™ UI.

Android flow

Note:

Procedure

  1. Set up your mobile test environment.
    1. Install HCL OneTest UI.
    2. Download Android Studio.

      You do not need to install the full Android Studio bundle, but be sure to install Android SDK Tools, Android SDK Platform-tools, and Android SDK Build-tools, if these are not already installed. The current download page of the Android SDK is at Android Studio but the location could change in the future.

      Note: Running the Android SDK Manager and using the Android emulators requires the Oracle Java Developer Kit (JDK). Be sure to also add the path to the Oracle JDK to your system's PATH environment variable.
    3. Run the SDK manager at least once before running HCL OneTest UI to get the API-level components.
    4. Set the Android SDK path in Windows > Preferences > Test > Mobile and Web UI > Android SDK to point to the directory where the Android SDK is installed.
    5. Install the mobile test client on one or more Android devices or on an emulator. Ensure that the mobile devices can connect to HCL OneTest UI over WiFi or a cellular plan. See Installing the Android mobile test client.
    6. Add your mobile devices to HCL OneTest UI.
  2. Prepare your mobile application for testing. From the Mobile and Web UI Applications window, add the web application to the list.
  3. From HCL OneTest UI, create a test project by clicking File > New > Test Workbench Project.
  4. Verify that the application is visible in the Mobile and Web UI Applications window.
  5. Create a test by recording gestures and user interactions on the mobile device.

    You can initiate the recording on the device or from HCL OneTest UI. Actions are represented in natural language, which allows you to document and reproduce the test manually.

  6. Examine and enhance the test script recording as needed. Here are some of the things you can do:
    • Add verification points to verify that an expected value or behavior is returned during a test run.
    • Add variables to the test script.
    • Add a loop so that the test runs multiple times.
    • Add a datapool to provide variable data rather than the data that you recorded.
    • Add application stubs to simulate the behavior of actual objects that interact with the application under test.
  7. Run the test.

    You can initiate a test run from the mobile device or from HCL OneTest UI.

  8. Evaluate the test results.
Feedback