Getting started with 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 is a high-level overview of mobile testing for Android:

Android flow diagram ../../com.ibm.rational.rtw.install.doc/topics/c_rtw_overview.html http://developer.android.com/sdk/index.html ../../com.ibm.rational.test.lt.moeb.doc/topics/tmobandinst.html ../../com.ibm.rational.test.lt.moeb.doc/topics/tmobandconfig.html ../../com.ibm.rational.test.lt.moeb.doc/topics/tmobprepand.html ../../com.ibm.rational.test.lt.moeb.doc/topics/tmobprepwb.html ../../com.ibm.rational.test.lt.moeb.doc/topics/tmobrecand.html ../../com.ibm.rational.test.lt.moeb.doc/topics/cmobtesteditovw.html ../../com.ibm.rational.test.lt.moeb.doc/topics/t_run_test.html ../../com.ibm.rational.test.lt.moeb.doc/topics/t_evaluate_results.html

Procedure

  1. Set up your mobile test environment.
    1. Install IBM® Rational® Test Workbench and ensure that Extension for Mobile are selected.
    2. Install the Android SDK on the same computer that the test workbench is installed on.

      You do not need to install the full Android Developer Tools (ADT) 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 Get the Android SDK 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 the test workbench to get the API-level components.
    4. Set the preferences in the mobile application builder path so that they point to the directory where the Android SDK is installed. See Mobile application builders.
    5. Install the mobile test client on one or more Android devices or on an emulator. Ensure that the mobile devices can connect to the test workbench over WiFi or a cellular plan.
    6. Add your mobile devices to the test workbench.
  2. Prepare your mobile application for testing. You can do this in one of the following two ways:
    • From your mobile device, upload the native or hybrid mobile application to the test workbench.
    • From the test workbench, add the application to the test workbench.
  3. From the test workbench, create a test project by clicking File > New > Test Workbench Project.
  4. Verify that the application is visible in the Test Navigator view in the test workbench.
  5. Create a test by recording gestures and user interactions on the mobile device.

    You can initiate the recording on the device or from the Eclipse client. 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:
    • Explore controls and context menus to customize the script to your needs.
    • Add application stubs to simulate the behavior of actual objects that interact with the application under test.
    • Add verification points to verify that an expected value or behavior is returned during a test run.
    • Add variables to the test script.
  7. Deploy and run the test, either from the mobile device or from the test workbench.
  8. Evaluate the test results.

What to do next

For additional guidance, see the Testing mobile applications with Rational Test Workbench playlist on YouTube.

Feedback