...

/

Setting up the Environment

Setting up the Environment

Get introduced to the installations required for running Appium.

Install Java

Appium has clients in multiple programming languages. Since we are going to use Java as our primary programming language, we will need Java JDK. The recommended version of Java is 8. Please also install AdoptOpenJDK or Oracle JDK.

Install Android SDK for Android automation

Android SDK is required for running tests on android phones. Android SDK can be installed on Windows, Mac, and Linux machines.

The easiest way to install android SDK and all its necessary components is by installing Android Studio. Please follow the link for installing Android Studio.

Once Android Studio is installed successfully, copy the location of the Android SDK installation as shown in the image below.

Installation of Android SDK
Installation of Android SDK

Setting the environment variables

Follow the below steps to add JAVA_HOME & ANDROID_HOME environment variables.

For windows,

  • Right-click on “My Computer” (or “This PC”) → Properties → Advanced system settings
  • Click on “Environment Variables”
  • Click on “New” under “User variables for user” or “System variables”
  • Input the key as JAVA_HOME and the value as the directory of Java installation.
  • Input the key as ANDROID_HOME and the value as the location of the Android SDK installation that we identified above.

For Linux, add the following line in ~/.bashrc

export JAVA_HOME=<java-8-installation-directory>
export ANDROID_HOME=<android-sdk-installation-directory>

In linux, ...