[Mobile] Android Setup

This article shows you how to set up real Android devices to test Android applications with Katalon Studio.

If you want to perform Android mobile testing with Android Studio (Emulator), you can refer to this document: [Mobile] Configure Android Studio (Emulator).

Set up Android tests on Windows, Linux, and macOS

On Windows machine

  1. Supported environments

    • Appium: 1.12.1 onwards.
    • Android: 6.x onwards (official releases).
  2. Download and install the suitable version of Node.js for your system from the Node.js website: Downloads.

    Notes:

    • Make sure you install Node.js into a location with full Read/Write permissions.
  3. Install Appium version 1.12.1 or newer via NPM. To install the latest Appium version, copy and paste the command-line argument as follows:

    npm install -g appium

    Notes:

    • We recommend installing the latest Appium version.
    • Some emulators support Appium directly when installed. If you want to run an application on an emulator, check your emulator settings before installing Appium.

    To learn more about Appium, you can refer to the Appium document here: Getting started.

  4. Set up the devices

    • Turn on the phone's developer mode. Go to Settings > Developer options, enable:

      • USB debugging – Debug mode when USB is connected.
      • Install via USB – Allow installing apps via USB.
      • USB debugging (Security Setting) – Allow granting permissions and simulating input via USB debugging.
    • Connect your Android phones to your computer via a USB cable.

    • Confirm to accept or trust the device.

  5. Install Android SDK

    Katalon Studio will automatically detect and ask you to install Android SDK if your current machine does not have it.

On macOS machine

  1. Supported environments

    • Appium: 1.12.1 onwards.
    • Android: 6.x onwards.
  2. Download and install the suitable version of Node.js for your system from the Node.js website: Downloads.

    Notes:

    • Make sure you install Node.js into a location with full Read/Write permissions.
  3. Install Appium version 1.12.1 or newer via NPM. To install the latest Appium version, copy and paste the command-line argument as follows:

    npm install -g appium

    Notes:

    • We recommend installing the latest Appium version.
    • Some emulators support Appium directly when installed. If you want to run an application on an emulator, check your emulator settings before installing Appium.

    To learn more about Appium, you can refer to the Appium document here: Getting started.

  4. Set up the devices

    • Turn on developer mode on your Android device. Go to Settings > Developer options.
    • Connect your Android Phone to your computer via a USB cable. Just confirm if prompted to accept or trust the device.
  5. Install Android SDK

    Katalon Studio will automatically detect and ask you to install Android SDK if your current machine does not have it.

On Linux machine

  1. Supported environments

    • Appium: 1.12.1 onwards.
    • Android: 6.x onwards.
  2. Download and install the suitable version of Node.js for your system from the Node.js website: Downloads.

    Notes:

    • Make sure you install Node.js into a location with full Read/Write permissions.
  3. Install Appium version 1.12.1 or newer via NPM. To install the latest Appium version, copy and paste the command-line argument as follows:

    npm install -g appium

    Notes:

    • We recommend installing the latest Appium version.
    • Some emulators support Appium directly when installed. If you want to run an application on an emulator, check your emulator settings before installing Appium.
    • If you see an EACCES error with the Appium installation command, follow the instructions of npm documentation here: Resolving EACCES permissions errors when installing packages globally.
    • If you encounter an error where the Java jar file can't be found, you might need to add the environment variable: KATALON_JAVA_HOME= <JRE_location>. See related discussion on Ask Ubuntu: How to set JAVA_HOME for Java?
    • Set the Appium directory manually in Katalon Studio Preferences. The default directory should be /usr/lib/node_modules/appium/.
  4. Set up the devices

    • Turn on developer mode on your Android device. Go to Settings > Developer options.
    • Connect your Android device to your computer via a USB cable. Just confirm if prompted to accept or trust the device.
  5. Install Android SDK (Optional)

    Katalon Studio will automatically detect and ask you to install Android SDK if your current machine does not have it.

Verify successful Android devices connection

After setting up your environment, to check whether Katalon successfully recognizes your Android devices, you can open a Mobile Testing Sample Project in File > New sample projects > Sample Android Mobile Tests Project.

Open Android sample project

On the main toolbar, select the Android device in the dropdown list next to Run.

Select Android devices

You should see the name of your Android device in the pop-up dialog.

Katalon recognizes Android devices

Next step:

See also:

Feedback