Skip to main content

[Mobile] Set up Android real devices

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

Note:

1. Install Appium

  1. Download and install the suitable version of Node.js for your system from the Node.js website: Downloads.
    Make sure you install Node.js into a location where you have full Read/Write permissions.
  2. Install Appium with the following commands in the Terminal:
    • For Katalon Studio 9.1.0 onwards, install the latest Appium version:
      npm install -g appium
    • For Katalon Studio before 9.1.0, install Appium 1.12.1+:
      npm install -g appium@version

    Some emulators come with Appium installed. If you want to run an application on an emulator, check your emulator settings before installing Appium.

    Note:

    For Linux machine:

    • 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/.

2. Set up the device

To set up the device on your Windows/macOS/Linux machine, do as follows:
  1. Go to Settings > Developer options to turn on developer mode on your Android device.
    1. On a Windows machine, you also need to enable the following settings:
      • 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.
  2. Connect your Android phones to your computer via a USB cable and confirm to accept or trust the device.
  3. Install Android SDK.
    Katalon Studio will automatically detect and ask you to install Android SDK if your current machine does not have it.

3. Verify successful Android devices connection

After completing setting up your environment, to check whether Katalon successfully recognizes your Android devices, open a sample Android project in File > New Sample Project.

Open Android sample project

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

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

Katalon recognizes Android devices

Next step:

Was this page helpful?