Testing Android applications
You can automate the testing of Android mobile applications in HCL OneTest™ UI by recording and playing back the recorded mobile tests.
Prerequisite tasks for recording Android mobile applications
- Installed the Android SDK on the computer that you want to use for testing Android mobile applications.
- Set or changed the value of the
ANDROID_HOME environment variable on the computer that
you want to use for testing Android mobile applications for the following
operating systems:
- Windows operating systems, see Setting or changing the ANDROID_HOME path in Windows operating systems.
- Linux operating systems, see Setting or changing the ANDROID_HOME path in Linux operating systems.
- Mac operating systems, see Setting or changing the ANDROID_HOME path in Mac operating systems.
- Connected and started the Android device that you want to use for testing Android mobile applications.
- Installed the Android application that you want to test on the Android device.
- Installed Google Chrome browser on the computer where Rational® Functional Tester is installed.
- Configured Android applications in a common web interface. See Configuring Android applications for mobile testing.
Recording tests for Android mobile applications
After you install the Android SDK and connect the Android device or emulator to your computer, you can then record the user interface and hardware actions in the Android application that you want to test.
- Insert user actions.
- Insert navigation actions.
- Assign variables.
- Insert verification points.
- Substitute data by using custom code or datasets.
You can create a single test or multiple tests by recording actions that you perform for different functions on the mobile application.
You can add multiple tests to a Compound Test. You can also include the test variables or a variables file to the Compound Test.
- When you want to run a single mobile test on multiple devices.
- When you want to run multiple mobile tests on a single device.
- When you want to run multiple mobile tests on multiple devices that are
connected on any of the following computers or device clouds:
- Computer that runs Rational® Functional Tester.
- Remote agent computer.
- BitBar Cloud.
- Perfecto Mobile Cloud.
Prerequisites for running tests for Android mobile applications
- Installed the Android SDK on the computer that you want to use for testing Android mobile applications.
- Specified the Android SDK path in Rational® Functional Tester by clicking that points to the directory where the Android SDK is installed.
- Set or changed the value of the
ANDROID_HOME environment variable on the computer that
you want to use for testing Android mobile applications for the following
operating systems:
- Windows operating systems, see Setting or changing the ANDROID_HOME path in Windows operating systems.
- Linux operating systems, see Setting or changing the ANDROID_HOME path in Linux operating systems.
- Mac operating systems, see Setting or changing the ANDROID_HOME path in Mac operating systems.
- Connected and started the Android device that you want to use for testing Android mobile applications.
- Installed the Android application that you want to test on the Android device.
Running tests recorded for Android mobile applications
- Computer that runs Rational® Functional Tester.
- Remote agent computer.
- BitBar Cloud.
- Perfecto Mobile Cloud.
You can play back a mobile test, multiple mobile tests, a Compound test, or an AFT Suite by using HCL OneTest™ UI. After you select the test, you can select the location where the Android devices or emulators are connected and then specify the Android device or emulator on which you want to run the test.
When you play back the Compound Test containing mobile tests, you can specify different Android devices or emulators for each of the mobile test in the Compound Test.
See Running mobile tests.
Viewing test results and reports
The test result is displayed as a unified report for the playing back of a mobile test. See Unified reports.
Troubleshooting issues when testing Android applications
If you encounter any issues when you are testing Android applications, you can refer to the problems and their resolutions in Troubleshooting issues.