USB Controller
Prerequisites
For a USB-connected device to be detected by the USB Controller on a Windows computer, it must be detected by the Android Debug Bridge (adb). You can download and install adb as part of the Android SDK download on the computer running the test workbench. The current download page of the Android SDK is at Get the Android SDK but the location could change in the future.
If necessary, download and install the specific USB driver for your device. For details, see http://developer.android.com/tools/extras/oem-usb.html or the web site of the device vendor.
Operations
To start the Android USB Controller, open the test workbench and click . Browse to the location of the Android SDK, click Apply, and click Start Now.
When the controller starts, it gets the list of currently connected devices and running emulators, and prompts you to install the mobile test client
Next, you will be prompted to start the mobile test client.
The icon at the bottom of the mobile test client home page shows that the mobile test client is connected to the test workbench with the USB Controller.
Commands and settings
The Android USB Controller starts in the Windows System Tray.
On Windows, right-click the System Tray icon for the test workbench to see the available devices and emulators, to install and start the mobile test client, and to change settings. (On a Macintosh computer, you can use left-click.)
When a device is unplugged or when an emulator is stopped, the corresponding menu entry is removed.
Devices and emulators menu
This menu shows the operations that are available with each device or emulator. When selecting the menu of a specific device, for example the asus Nexus 7, there are four available operations:
- Check latest client is installed and launch: Checks to see if the mobile test client is installed on that device and if its version is the latest one. Then, it starts the client.
- Check latest client is installed and launch in passive mode: Same as the previous option except the client is automatically set to passive mode
- Save logcat: Saves the adb logcat file that contains useful information for troubleshooting why an app crashes or behaves oddly
All menu
This menu allows you to perform the same operations on all connected devices and emulators.
Settings menu
The Settings menu includes the following operations:
- Monitor newly plugged-in devices and launched emulators: The install and launch operations can be temporarily disabled for the newly plugged-in devices or launched emulators. Doing so is useful when plugging in a device to the test workbench host for operations that are unrelated to testing, such as synchronization and updates. This setting is enabled by default.
- Silently ensure latest Mobile Client is installed: When enabled, you are not prompted to install the mobile test client. When disabled, the default behavior applies (end-user is prompted).
- Silently launch Mobile Client configured with workbench URL: When enabled, you are not prompted to start the mobile test client. When disabled, the default behavior applies (end-user is prompted)
- Do not quit when workbench exits: Keeps the USB Controller running even after the test workbench exits. This setting is especially useful when running tests from the command line.
Troubleshooting menu
The Android Debug Bridge can become less reliable after a a period of intense usage. The Reset Android Debug Bridge server menu item in the Troubleshooting menu allows you to kill the adb server. You can kill the server when other commands have no effect or no longer have the expected effect.
In addition, if an Android emulator no longer responds to any commands or user input, or the emulator experiences connection errors or hangs, close the emulator window and launch it again from the AVD Manager (Android Virtual Device).
Quit menu
The Quit menu closes the USB Controller. All USB connections and silent install ability are lost. You must restart the controller from the workbench Preference page.
Command line options
Use UsbController.jar from the command line to install the mobile test client from a remote test workbench host and set up the connections between the mobile test client and the test workbench. See Installing and configuring the Android client when HCL OneTest UI is remote for a list of command line arguments.