How to Download and Install Appium
By Jash Unadkat, Technical Content Writer at BrowserStack - September 25, 2020
Appium is one of the most popular open-source tools when it comes to automated mobile app testing. It allows developers or QA engineers to automate tests for native, hybrid, and mobile web applications. Appium uses the WebDriver protocol to automate iOS, Android, and Windows applications.
To understand the complete architectural implementation, refer to this detailed guide on Appium.
This article aims to demonstrate the fundamental steps to get started with the Appium installation.
There are 2 methods to install Appium –
- From the terminal using Node.js
- Directly from the Appium desktop client
Let’s discuss both methods in detail.
Method 1: Installing Appium using Node.js
- The first step is to verify whether Node.js is already installed in the system.
To do so, open the terminal and run the following command:
If Node.js is already installed in the system, it’ll return the Node version, else it throws an error stating – ‘node is not recognized’, which means Node.js is not installed in the system.
- To install Node.js, visit the download section of the official Node.js website.
Choose the Node installer as per the underlying operating system (Mac or Windows) in use. Windows users can verify the bit size (32 bit or 64 bit) by checking computer properties. Download the installer accordingly.
Once the installer is downloaded, run it and proceed with installation. Define the path explicitly if required. Once the installation is complete, restart the terminal and run the command -> node –version again. It will return the Node version.
This indicates successful installation of Node.js. The Node.js installation also covers the installation of npm (node package manager).
Mac users can use the node -v and npm -v commands to verify the installation and version details.
- To install Appium, run the following command.
npm install -g appium
The command above will download and install Appium. Once done, verify the Appium installation on macOS or Windows by running the command below:
This will return the latest Appium version installed in your system.
- To start the Appium server directly from the terminal just enter “appium” as a command. It will start the Appium server on Port number 4723.
With the steps above, we have successfully installed Appium using Node.js.
Want to run Appium tests on real Android and iOS devices? BrowserStack’s cloud-based infrastructure makes Appium testing on real devices simple, intuitive, and effortless. Sign up, configure the desired device-OS combination, and start testing for free.
Method 2: Installing Appium using Appium Desktop Client
Note: The Appium Desktop app serves as a powerful GUI for developers or QA engineers for running automated mobile tests. It is compatible with MacOS, Windows, and Linux. The Appium Desktop app provides an intuitive user interface for controlling and configuring the Appium server.
Refer to this official resource for Appium Desktop to learn more about its features and offerings.
The installation of the Appium Desktop Client is bundled with Node runtime, so users do not need to install Node or npm explicitly.
To get started with Appium Desktop installation, follow the steps below:
- Visit the official Appium site
- Click on the Download Appium button
- The Download button redirects the user to the GitHub page
- From the GitHub page, Windows users need to download the .exe file and Mac users need to download the .dmg file
- Once the Appium Desktop file for the respective OS is downloaded, start the installation by double-clicking on that file. Mac users need to drag the Appium logo to the Applications folder to initiate the installation. Once the installation is complete, start the Appium Desktop Client.
- Users can now start or stop the Appium server using this user interface. They can also configure their test environments using the Appium Desktop Client.
Before proceeding with any test scenarios, developers or QAs must consider installing and running Appium doctor. It is a tool that attempts to identify and resolve common configuration issues in Node, iOS, and Android prior to Appium automation.
- Install Appium Doctor using the following command:
npm install appium-doctor -g
Once the tool is installed, one can view the list of inspections available by running the command below:
The image below represents the available commands one can use to verify the dependencies for a particular test environment prior to test automation.
For example, before getting started with automation on Android devices, QAs must run the command – appium doctor –android. This will display all missing and existing dependencies required for Android automation.
Prior to test automation on mobile platforms, teams must have all dependencies and tools properly configured on their systems. The methods explained above will serve as a fundamental guide for QA engineers and developers seeking to get started with Appium automation on mobile devices.
Also, as mentioned earlier teams or individuals must consider leveraging cloud-based platforms like BrowserStack that provides integration with Appium. This will enable QA engineers to run Appium tests across a range of actual mobile devices in real user conditions.