USB Controller

The USB Controller is a java process that starts when the test workbench starts and exits when the workbench closes. Its role is to monitor the installation and uninstallation of plugged-in devices and emulators. It also provides a way to establish a connection between the mobile test client and the test workbench in a secure environment that does not have WiFi or Ethernet connectivity. The USB Controller enables the Android silent mode feature which allows full automation of test playback.

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 Window > Preferences > Test > Mobile and Web UI > Mobile Application Builders. Browse to the location of the Android SDK, click Apply, and click Start Now.

Mobile preferences page

Note: The controller will not start with the workbench if the Android SDK location is not set or is invalid.

When the controller starts, it gets the list of currently connected devices and running emulators, and prompts you to install the mobile test client, as shown below:

USB controller message

Next, you will be prompted to start the mobile test client.

USB controller message

The icon at the bottom the mobile test client home page shows that the mobile test client is connected to the test workbench with the USB Controller.

Mobile client

Commands and settings

The Android USB Controller starts in the Windows System Tray.

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.)

USB controller options

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:

USB controller options

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:

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 the workbench is remote for a list of command line arguments.


Feedback