Requirements for executing in Android

From GXtest Wiki
Jump to: navigation, search
Spanish.gif
English.gif
Japan.gif

This page enumerates all the software and configuration requirements to be able to test an Android application using GXtest 3.0 (or greater).

Contents

Configurations on the Android device


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, we must turn on the property "Enable Test Mode":

http://wiki.genexus.com/commwiki/servlet/wiki?Android+Enable+Test+Mode+Property,

If we do not have this property available (GeneXus Ev3U2 or U3), we need to 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 -> Configuration.
  • After setting the SDK path, by clicking Refresh list, the connected deviced and emulators will be shown. There you may choose the one you want for executing the test case.
  • 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 shouldn't have any locking settings. To remove the automatic locking settings on the device or emulator, you should enter the device or emulator, and go to Android Settings -> Security -> Screen Lock -> None (this path may change depending on the Android version and device/emulator model).


GO back to GXtest for Smart Devices