Android devices#
Commands that manage Android devices: install and launch the app, set up port forwarding, and work with native elements.
Every command also takes the global options, such as --host and --port.
android devices / android install / android launch / android uninstall#
Parameters
Name |
Required |
Description |
|---|---|---|
|
No |
Serial number of the target device. Requires |
Returns
List of connected devices (
devices). Confirmation forinstall,launch, anduninstall.
Examples
alttester android devices # List connected devices
alttester android install path/to/game.apk # Install an APK
alttester android launch com.example.game # Launch an app
alttester android uninstall com.example.game # Uninstall an app
android forward / android clear-forward#
Required when testing on a physical Android device so the CLI can reach the AltTester® server running inside the game.
Parameters
Name |
Required |
Description |
|---|---|---|
|
No |
The port to forward. The default value is: |
|
No |
Serial number of the target device. |
Returns
Confirmation.
Examples
alttester android forward --port 13000
alttester android clear-forward
android find / android tap / android source#
Parameters
Name |
Required |
Description |
|---|---|---|
value |
Yes (find, tap) |
The element to find or tap. |
|
No |
Locator strategy for |
|
No |
Serial number of the target device. |
Returns
AltObject for
find. Confirmation fortap. Native UI hierarchy XML forsource.
Examples
alttester android find Allow
alttester android tap Allow --by resource-id
alttester android source
android run#
Installs, launches, and sets up an app for testing in one command.
Parameters
Name |
Required |
Description |
|---|---|---|
path |
Yes |
Path to the |
|
No |
The application package name (e.g. |
|
No |
Set up ADB reverse port forwarding automatically. The default value is: |
|
No |
The port to forward. The default value is: |
|
No |
Connect the AltTester® driver after launch. The default value is: |
|
No |
Serial number of the target device. |
Returns
Confirmation that the app is installed, launched, and ready for testing.
Examples
alttester android run path/to/game.apk
alttester android run path/to/game.apk --package com.example.game --port 13000