Skip to content
/ .. / .. /
AppTest Configuration





Apptest Configuration

The AppTest block enables setting app-specific configurations at the project level as well as server ports.

Note:

  • Selendroid (which is not the same as Selenium) is activated by default when running intaQt.

  • Selendroid may be deactivated by setting the Appium configuration.

  • The Android Package Kits (APKs) for the application under test must also be configured. Additional information about APKs is available in APK Management.

Syntax

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
AppTest {
    driverCreationWaitMilliseconds = <Number>
    portRange {
        min = <Number>
        max = <Number>
    }
    apps = [
        {
            name = <String>
            path = <String>
            capabilities = <Map<String, Any>>
        },
        ...
    ]
}

Parameters

  • driverCreationWaitMilliseconds - The number of milliseconds to wait for driver creation for App testing

    • Default is set to 100000
  • portRange - The available port range for the Apptesting server

    • Default range is set to [1024, 65535]
  • min - The lowest available port

    • Should be greater or equal to 1024
  • max - The highest available port

    • Should be lower or equal to 65535
  • apps - Contains app-specific configurations:

    • name - The name of the app.
      • Important! This information will be used by the steps in test cases that refer to this app
    • path - The path to the apk file
    • capabilities (Optional) - The optional map of capabilities used to specify the way the automation session should behave
      • For more information, refer to the Appium Github documentation
        • The newCommandTimeout capability should be used if the app should be idle for an amount of time
        • By default, newCommandTimeout is set to 0, which disables closing idle sessions

Important!

  • Special attention must be paid to XPaths in case of migrating existing Selendroid tests to Appium, as the XPaths are different for Appium.

  • Android SDK's uiautomatorviewer can be used to find XPaths. It is normally located at $ANDROID_HOME/tools/bin/uiautomatorviewer.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
AppTest {
    driverCreationWaitMilliseconds = 100000
    portRange {
        min = 1024
        max = 65535
    }
    apps = [
        {
            name = "My App"
            path = "/Users/QiTASC/MyApps/"
            capabilities {
                platformVersion = "10.3.1"
                appWaitActivity = "com.qitasc.app/MyStartActivity"
            }
        },
        ...
    ]
}

Configuration Examples

AppTest Configuration with Appium Server Settings

The AppTest configuration allows configuring the Appium server per session using Appium's Settings API. These settings are sent to Appium, which allow any current or future settings to be configured.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
AppTest {
    driverCreationWaitMilliseconds = 100000
    portRange {
        min = 1024
        max = 65535
    }
    apps = [{
       name="anAppName",
       path="resources/apks/anApp.apk",
           capabilities    {
               appPackage = "com.samsung.android.oneconnect"
               appWaitActivity    = "..."
               automationName    =    "uiautomator2"
               noReset         =   "true"
           },
           settings: {
                   waitForIdleTimeout: 0
          }
   }]
}

Examples of settings that Appium exposes include the following:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
actionAcknowledgmentTimeout: 3000,
    allowInvisibleElements: false,
    ignoreUnimportantViews: false,
    elementResponseAttributes: "",
    enableNotificationListener: true,
    keyInjectionDelay: 0,
    scrollAcknowledgmentTimeout: 200,
    shouldUseCompactResponses: true,
    waitForIdleTimeout: 10000,
    waitForSelectorTimeout: 10000,
    shutdownOnPowerDisconnect: true

Configure Appium to Allow iOS 12 Testing

Phones with iOS 12 must exclude the path from the apps block and instead define the of the app bundle ID to be opened. This will open the app on the phone instead of installing it.

Configuration for iOS usage done by specifying two properties: bundleId and updatedWDABundleId. Additionally, it must include the team ID that matches the provisioning profile on the device.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
AppTest {
    driverCreationWaitMilliseconds = 100000
    portRange {
        min = 1024
        max = 65535
    }
    apps = [{
       name = "sketch",
       capabilities {
          bundleId : com.autodesk.ios.SketchBookPro3,
          updatedWDABundleId : com.autodesk.ios.SketchBookPro3,
          automationName  : XCUITest,
          xcodeOrgId      : V12345678,
          xcodeSigningId  : iPhone Developer,
          useNewWDA      : false,
          platformVersion : 11.3,
          fullReset       : false
            }
        }]
}