[Mobile] Android Setup in Katalon Studio
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
- Supported environments
-
Appium: 1.12.1 onwards.
-
Android: 6.x onwards (official releases).
-
-
Download and install the suitable version of Node.js for your system from the Node.js website: Downloads.
Note:- Make sure you install Node.js into a location where you have full Read/Write permissions.
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
Note:To learn more about Appium, you can refer to the Appium document here: Getting started.-
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.
-
- 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.
-
-
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
- Supported environments
-
Appium: 1.12.1 onwards.
-
Android: 6.x onwards.
-
-
Download and install the suitable version of Node.js for your system from the Node.js website: Downloads.
Note:- Make sure you install Node.js into a location where you have full Read/Write permissions.
- 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:To learn more about Appium, you can refer to the Appium document here: Getting started.
npm install -g appium
Note:- 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
- 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.
-
-
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
- Supported environments
-
Appium: 1.12.1 onwards.
-
Android: 6.x onwards.
-
-
Download and install the suitable version of Node.js for your system from the Node.js website: Downloads.
Note:- Make sure you install Node.js into a location where you have full Read/Write permissions.
-
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
Note:- 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/
.
- 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.
-
-
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 completing 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.
On the main toolbar, select the Android device in the dropdown list next to Run.
You should see the name of your Android device in the pop-up dialog.
Next step:
See also:
- Troubleshoot automated mobile testing
- Learn more with our Katalon Academy course: Solve Mobile Testing Challenges with Codeless Solution