Installing and configuring the Android client when HCL OneTest UI is remote

You can also use the USB Controller to install and configure the Android mobile test client in a secure environment where HCL OneTest™ UI is installed remotely on another computer, such as on a lab computer.

Before you begin

  • Install the Android Debug Bridge (adb) and the specific USB driver for your device.
  • Verify that release 6 or later of a JDK or JRE is installed.
  • For Android 6 devices that are connected to the computer running HCL OneTest UI with a USB cable, open Device Settings > Developer Options on the device and deselect Verify apps over USB. Otherwise, a conformation dialog opens each time the mobile test client or an application under test (AUT) is installed.

For additional details, see Installing and configuring the Android client with the USB Controller.

Procedure

  1. Start HCL OneTest UI on the remote host, that is, the computer where HCL OneTest UI is installed. The host can be local or remote, but the USB host must be local, that is, you must be able to physically connect a device to the USB host.
  2. In HCL OneTest UI, click the Display Workbench URL icon Workbench URL and copy the Workbench URL to the clipboard by using the link provided.
  3. Open a browser window on the USB host and paste the Workbench URL into the browser. The USB host must be a local computer (Windows, Mac or Linux) to which you can physically attach a device to the USB port.
  4. When the Mobile Welcome Page opens, click Proceed with Android instructions.
  5. From the Android Welcome Page, under Use a workbench from a remote USB host, click Show the steps.
  6. Click to download UsbController.jar and save it to a local folder.
  7. Attach one or more Android device with a USB cable to the USB host and run UsbController.jar as follows to learn about mandatory and optional parameters.
    java -jar UsbController.jar
  8. Run UsbController.jar as follows with the -a and -w arguments to download the mobile test client from the host and set up the connection between the mobile test client and HCL OneTest UI.
    java -jar UsbController.jar -a android-sdk-install-dir -w  Workbench URL 

    For example:

    java -jar UsbController.jar -a "C:\Program Files(x86)\Android\android-sdk" -w  http://192.168.1.103:7878  

    Be sure to enclose the location of the Android SDK with double quotation marks if the location contains any spaces.

    The full set of command line arguments is listed below. Only the -a and -w arguments are mandatory.

    • -a specifies the location of the Android SDK (mandatory)
    • -w specifies the Workbench URL (mandatory)
    • -i silently ensures that the latest mobile test client is installed
    • -l silently starts the mobile test client configured with the Workbench URL
    • -c specifies an alternate location of the package (.apk) for the mobile test client; default is downloaded from Workbench URL
    • -logdir specifies the directory to create the USB Controller log
    • -o specifies the port number, in decimal, for the Android adb server; default is 5037 or content of the environment variable named ANDROID_ADB_SERVER_PORT.
  9. Unless the mobile test client is already installed, you will be prompted to install the mobile test client on any connected Android devices.

    You can automate this step and eliminate the installation dialog box with the -i argument to the command line. This argument ensures that the latest mobile test client is installed, for example:

    java -jar UsbController.jar -a "C:\Program Files(x86)\Android\android-sdk" -i -w  http://192.168.1.103:7878   
  10. After the installation completes, you will be prompted to start the mobile test client and to complete the setup. The setup process configures the mobile test client and connects the client automatically to the test workbench.

    Click Yes Always to always start the Android client after the client is installed or click Yes to start the Android client just this time.

    You can eliminate the launch dialog box with the -l argument to the command line. This argument starts the mobile test client silently, for example:

    java -jar UsbController.jar -a "C:\Program Files(x86)\Android\android-sdk" -l -w  http://192.168.1.103:7878   

Results

You are now ready to start testing. See Creating mobile tests.
Feedback