You can automate the process of adding Android apps to the test workbench with the AddAndroidApp.jar command
line tool, which you can download from the Android Welcome Page. This tool instruments the
application under test and then adds it to the test workbench.
Procedure
- Start test workbench.
- In the test workbench, click the Display
Workbench URL icon
and copy the Workbench URL to the clipboard using the link provided.
- Paste the link into your web browser.
- When the Rational® Test Workbench Mobile
Welcome Page opens, click Proceed with Android instructions.
- Under Use a command-line tool to add Android applications that you want to test to
the workbench, click Show the steps.
- Verify that you have release 6 or later of a JDK or JRE installed on your computer. Then, click
Click here to download to download AddAndroidApp.jar.
Save the download to a local folder.
- Change to the local folder where you downloaded the jar file.
- Run AddAndroidApp.jar as follows to learn about mandatory and optional
parameters for the file.
java -jar AddAndroidApp.jar
Note: The AddAndroidApp.jar file returns an exit code of 0 when it runs
successfully.
- Run AddAndroidApp.jar as follows to instrument an AUT, such as
Calculator.apk and add it the test workbench.
java -jar AddAndroidApp.jar -w http://192.0.2.24:7878 C:\MyAndroidApps\Calculator.apk
Running AddAndroidApp.jar results in three new .apk
files:
- I-original apk name.apk - Recording-ready
application
- R-original apk name.apk - Playback-ready
application
- T-original apk name.apk - Test engine for the
application
See How the test workbench tests Android applications for details about the
.apk files and the Android build chain. See AddAndroidApp.jar script for additional examples and command line
arguments.
- To automatically update tests of a previous version of the AUT to use the latest version of the
AUT, click and select Always for Test Suite Refactoring when
adding application.