Now that we have understood about Appium and its architecture, it’s time to actually write some automated tests for mobile applications. But before we write some tests we will have to get all the installations done. This post will be your step by step guide to setup Appium for Android on Windows OS.
We will need the following setup before writing our tests.
- JDK (Java Development Kit) installation
- Android SDK installation
- Appium installation
- IDE of your choice (to write the actual tests)
NOTE: You can skip one or more steps mentioned below if you already have the necessary installations done.
JDK (Java Development Kit) installation
- Go to Java download page
This page will have the latest JDK version available for download. Download and install the latest version from here.
- If you want older version say JDK 7 – You can
- Click on “DOWNLOAD” for JDK
- Accept the license agreement (select the radio button) and choose the JDK file as per your OS (Since we are doing this step for windows, we have selected Windows x64)
- Based on your browser, you may get a prompt to save the file. Click on Save to save the .exe to a location of your choice. If you are using Chrome, the file will be downloaded and saved to your downloads folder
- Go to the location where you have saved the .exe file and double click the exe to begin JDK installation
- Go through the installation wizard and complete the installation (It is recommended to keep the default installation location and note down the installation location)
- After the installation is complete successfully, you will see a dialog showing installation successful message. Click on “Close”
To complete proper JDK installation, you have to set JAVA_HOME variable. Here is how you do it.
Set up JAVA_HOME variable
First you need to know the installation path for the Java Development Kit (you have noted in step #6 above).
Open the default installation path for the Java Development Kit
There should be a subdirectory like
Set the JAVA_HOME Variable
Once you have the JDK installation path:
- Right-click the My Computer icon on your desktop and select Properties.
- Click on Advanced systems settings.
- Click the Environment Variables button.
- Under System Variables, click New.
- Enter the variable name as JAVA_HOME.
- Enter the variable value as the installation path subdirectory for the Java Development Kit.
- Click OK.
- Click OK/Apply Changes.
You might need to restart windows.
That’s it. You have successfully installed JDK. In the next post we will see how to do Android SDK Installation.
If you like the post or found it useful, don’t forget to share it. Feel free to comment and let us know your thoughts.