Skip to main content

Getting Started with Android and AIQ

GetSetup

Started

Configure Environment Variables

    Set JAVA_HOME environment variable.

    Add JAVA_HOME/bin to PATH environment variable.


    Install and Setup Android Studio

      Set ANDROID_HOME environment variable.

      Add ANDROID_HOME/platform-tools and ANDROID_HOME/tools to PATH environment variable.

      Download and install Android SDK Platforms.


      Create Virtual Device (Android Emulator)

        Start Android Studio

        Click Configure

        Click AVD Manager

        Click Create Virtual Device

        Select any Profile

        Click Next

        Select Any System Image

        Click Next

          If button is greyed out, download any System Image

          Provide Name

          Click Finish


          Configure your Appium Server Emulator or physical Android phone file

          The Appium Server configuration file must be updated for your specific environment and Application. This is a JSON file that contains an array of objects. Each object corrresponds to a machine which has Appium running and the Emulator installed or physical Android phone connected. The required keys and values of each object are:

          {
            “serverURL”: “http:/example.com:4723/wd/hub, URL in which Appium runs”,
            “proxyURL”: “http://example.com:9090, optional, URL in which Test Designer runs”,
            “capabilities”: {
              “platformVersion”: “9, Appium seems to automatically detect the version”,
              “udid”: “some identifier, must be in list of adb devices command”,
              “systemPort”: “8200 - 8299, to automate multiple Emulators or physical Android phones”,
              “deviceName”: “Android 1, can be whatever name”
            },
            “app”: “Absolute path to where .apk file is in local file system or URL of .apk file, needed if value for appPackage is empty and value for appActivity is empty”,
            “appPackage”: “Package of AUT, needed if value for app is empty, otherwise is optional if value for app is not empty”,
            “appActivity”: “Main Activity of AUT, needed if value for app is empty, otherwise is optional if value for app is not empty”
          }

          Download the android-emulator-physical.json file and open it in an editor.

          Download here: android-emulator-physical.json

            Replace the udid value in the template with the Identifier number of the Emulator or physical Android Testingphone after running adb devices command.

            Update the appPackage to match your Application’s Package.

            Update the appActivity to match your Application’s Main Activity.


            Create Android AISG

              Open Terminal

              Enter appium and press Enter

              Start AIQ services if not already running

              Log into AIQ and go to AI Scripting > Create AISG

              Click Mobile
              If Mobile is disabled, request an updated AIQ license

              Select Android in AIQthe Platform box

              Select Package in the Source box

              Select Tags in the Scan Type box (SmartTags not yet supported for Mobile)

              Confirm Visual Hints are enabled

              Click Browse in the Appium Servers box.

              Select the Appium Server Simulator description file created earlier in the setup

              Click Next

              Proceed with the AISG creation

                Enter a name in Execution Name box

                Click Load a Dataset from CSV file and check the Datasets in the list or check Default and enter variables and values

                Click Create

                AISG starts the Application and begins discovering its elements

                As Inputs Found updates, map any Custom Actions until the desired end point is reached in the Application

                If proxyURL is not empty in Appium Server configuration file, Appvance certificate installed in Emulator or physical Android phone, Application is compiled to use Appvance certificate and proxy settings of Simulator or physical iPhone configured to point to value of proxyURL

                  Click Requests tab to view captured Requests performed during AISG

                  Download Requests Report

                  If Validations Workbench file is supplied, click Validations tab to view successful and failed Validations

                  Download scripts in JS format (DS not yet supported for Mobile) to run in JS Edit & Play or in a Scenario


                  Notes

                    UseTo run tests in Emulators, these must be already running since Appium won’t start them up. If capability “avd”: “name of Emulator” is provided, Appium will start only this checklistEmulator.

                    If capability “app”: “absolute path or URL of .apk file” is provided, Appium will try to prepareinstall Application if not installed.

                    After connecting physical Android testingphone to computer, Trust this computer dialog may show, click Accept button and checkbox to remember setting.

                    It is normal if Appium logs show many entries with AIQ.ECONNRESET Exact device, emulator, and driver requirements can vary by AIQ release, so confirm the release-specific prerequisites before execution.error.

                    Setup

                    checklist
                    • Use

                      If aAppium supportedlogs show ECONNREFUSED or socket hangup errors, remove AUT from memory, shutdown Emulator or disconnect physical Android devicephone, restart Appium, restart Emulator or emulatorreconnect forphysical theAndroid AIQphone.

                      release.
                    • Install the
                    application
                    build
                    intended

                    Last forupdated: testing.

                    ConfirmJune network26, access2023 to

                    If theyou application andhave any requiredfeedback teston services.

                    Usethis approvedtopic, testplease accountscontact andus resettableat test data.

                    Validation steps

                    1. Confirm the device is visible to the execution host.
                    2. Run a small smoke test before building longer scenarios.
                    3. Review output, screenshots, and logs for device or environment failures.
                    4. Document device model, OS version, application build, and AIQ version when reporting issues.

                    Last updated: September 18, 2026documentation@appvance.ai