Testing Android applications
You can automate the testing of Android mobile applications in HCL DevOps Test UI (Test 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. You can connect the Android device to the computer through a USB cable.
- Installed the Android application that you want to test on the Android device.
- Installed Google Chrome browser on the computer where Test UI is installed.
- Configured Android applications in a common web interface. See Configuring Android applications for mobile tests.
Recording tests for Android mobile applications
After you 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.
See Recording mobile tests for Android applications.
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 Test UI.
- Remote agent computer.
- BitBar Cloud.
- BrowserStack Cloud.
- Perfecto Mobile Cloud.
- pCloudy Cloud.
Prerequisites for running tests for 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. You can connect the Android device to the computer through a USB cable.
- Installed the Android application that you want to test on the Android device.
Running tests recorded for Android mobile applications
- Computer that runs Test UI.
- Remote agent computer.
- BitBar Cloud.
- BrowserStack Cloud.
- Perfecto Mobile Cloud.
- pCloudy Cloud.
You can play back a mobile test, multiple mobile tests, a compound test, or an AFT Suite by using Test 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.
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 when testing Android applications.