Adding an Android TV device to Suitest

Suitest supports Android TV devices running Android version 5.0 or later. After setting up an Android TV device you will be able to run automated end-to-end tests on Android TV apps.

Android TV devices are operated by SuitestDrive. Before adding Android TV device to your Suitest account, you need to pair your SuitestDrive with your Suitest organization.

Installing Java

Download and install Java SE Development kit which is used internally by Suitest.

Set environment variables

For the JDK to work properly you will have to set the JAVA_HOME environment variable and add JDK root to your PATH.

Make sure SuitestDrive application is closed before setting the environment variables.

Windows 10

On Windows 10 open command line prompt as administrator (press Win + S, then type cmd, right click the found Command prompt application and select "Run as administrator") and then copy & paste the code lines below. (Replace [JDK folder] with the folder name where the JDK has been installed).

set JAVA_HOME=C:\Program Files\Java\[JDK folder]
set PATH=%PATH%;%JAVA_HOME%\bin;
  1. On MacOS open your terminal via CMD+SHIFT+T.

  2. In the terminal enter:

    nano .bash_profile
  3. nano will open, then add a new line with the following (adjust the path based on your installation):

    export JAVA_HOME=$(/usr/libexec/java_home)
  4. Press CTRL+X, then y to save and ENTER twice to save the file.

  5. In the terminal run the following:

    source .bash_profile
  6. In the terminal run the following (adjust the path based on your installation):

    echo $JAVA_HOME /Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home
  1. On Ubuntu open the terminal via CTRL+SHIFT+T.

  2. In the terminal enter:

    sudo nano /etc/environment
  3. nano will open, then add a new line with the following (adjust the path based on your installation):

    export JAVA_HOME
  4. Press CTRL+X, then y to save and ENTER twice to save the file.

  5. Load the variable by running the following command in your terminal:

    source /etc/environment
  6. Verify the variable has been set by running the following in the terminal:

    echo $JAVA_HOME

Output should be the same as the path that was set in step 3.

Launch Android dependency wizard (Windows/Linux only)

At this point you should have paired SuitestDrive with a Suitest organization.

Go to SuitestDrive and open Help > Android Dependency Wizard. SuitestDrive will verify that the JDK has been correctly installed. If you have followed this guide to the letter, the wizard should complete with the message No issues found.

Locate the IP address of your Android TV device

The current IP address is usually displayed on the Network status page of the device. Go to Settings > About > Network and look for the IP address. The location may vary from device to device.

Static IP address: To prevent connection failures due to the device IP address changes you should consider configuring your DHCP server to assign static IP address to your device.

Add the Android TV device to Suitest

Open the Device wizard, select Add physical device, choose Android TV from the platform list and then press Next.

Android TV device details
Android TV device details

On the next screen fill in all the fields and press Next. Suitest will verify that it can connect to your device.

Allow debug mode

When connecting to the device for the first time the device may popup a message asking you to allow the debug mode. Be sure to allow it or else the device will refuse connection from Suitest.

The rest of the process will complete automatically. After this the Android TV device will become available in your Suitest account. Suitest will automatically determine the name of the device. You'll be able to change it later on the device management page.

Now that you have your Android TV device configured, it's time to instrument your app and start testing.

Something went wrong?

Please check the Android TV troubleshooting section for guidance.