Starting an Android application from the command line tool
This example demonstrates the steps involved in launching an Android application using the Android command line tool with the Start command
- The Android command line tool is only applicable when one or more devices are connected to the host PC via USB cable.
Ensure that the following requirements are met:
TestArchitect Agent is installed on the targeted Android device (refer to Installing TestArchitect Agent ).
The Android command line tool (ast.exe in Windows can be found at the following location when TestArchitect is installed:
- Windows: TA_INSTALL_DIR/LogiGear/TestArchitect/device/android.
At the host PC’s command prompt window, change the current working directory to TA_INSTALL_DIR/device/android.
Type ast.exe start “com.logigear” -s “2c4401c15d52” to start the Car Rental application installed on the targeted Android device whose unique ID is 2c4401c15d52.
Review Start command to understand the Start command’s syntax.
Tip:If there is only one Android device connected to the host PC via USB cable, the unique ID parameter is optional.
To obtain the package name of an Android application:
Open the Android Instrumentation Tool dialog box.
In the Application Under Test panel, right-click the appropriate application, and then select Copy package name.
Paste the copied value into the Package Name parameter in the Start command.
To obtain the unique ID of an Android device:
- Open the Android Instrumentation Tool dialog box.
- Select the device whose unique ID you wish to obtain.
- Click on the Android Instrumentation Tool’s toolbar to copy the unique ID to the clipboard.
- Paste the copied content into the unique ID parameter in the Start command.
Press Enter on your keyboard to execute the Start command.
The selected application is launched on your targeted Android device, and the <Package Name> is started successfully message appears in the command line window.