Requirements for executing in Android
From GXtest Wiki
This page enumerates all the software and configuration requirements to be able to test an Android application using GXtest.
Contents |
Configurations on the Android device
- The device or emulator must have Android 4.2 or greater
- Suported emulators are SDK Android emulator and GenyMotion
Software requirements
- Android SDK
Android SDK Manager components required:
- Android SDK Build-tools
- Android 4.4.2 API 19 (by default GeneXus apps are generated for API 19)
- Google Play Services
- Google USB Driver
Recommended:
- Intel x86 Emulator Accelerator (HAXM installer) - Only if you plan to use the SDK Android emulator
GeneXus configuration
- The Android application that will be tested must be generated from GeneXus with "Test" mode enabled. This allows to automate the tests on the generated application. To enable this configuration in GeneXus Ev2 and Ev3U3, we must edit the ControlTest.java file, which is located inside the GeneXus installation path, in the folder:
Android\FlexibleClient\src\com\artech\ui\test
Once we find the file, we need to un-comment the following line: control.setContentDescription(definition.getName());
This change implies that additional information about each control will be included in the ContentDesc attribute of Android controls. This is needed so GXtest can identify each control during test case execution. This setting does not affect the behavior of the generated application, so it can be used as a production version of the app.
Other configurations required
- You must set the Andorid SDK path in GXtest Designer, by selecting the option menu: Smart Devices -> Settings.
- Set the path to the application package file (apk file) of the application that will be tested. This path must be set to the project variable named 'apkPath'.
- If you are planning to executing on a real device, you may install the USB device compatible drivers, and configure the device following the Android documentation.
- In order to run the test cases without any interaction with a human, the device shouln't have any locking settings. To remove the automatic locking settings on the device or emulator, you should go to 'Settings -> Security -> Screen Lock -> None' on the device (this path may change depending on the Android version and device/emulator model)
GO back to GXtest for Smart Devices