How to Install Appium on Ubuntu?

Are you curious about installing Appium, which enables smooth software testing automation for different platforms under a single interface? You are at the right stop. This blog is a comprehensive guide that includes an overview of Appium, its key features, the installation process, and more. The blog consists of all the key dependencies and configurations in one place. Once you complete reading the blog, you will thoroughly gain hands-on Appium installation skills. Wait, let’s start.

It is essential that the functionalities of applications should meet the requirements fully. It helps to ensure the right function of applications.

From the developer’s standpoint, several testing techniques, such as integration or unit testing, are used while creating the product. But, it becomes pivotal to test the application from the end-user’s perspective. 

Hence, testing the application according to the actual scenarios in the application’s UI is crucial. We use the Appium framework for this purpose. This blog also includes the step-by-step procedure to install the Appium framework on the Ubuntu platform.

Table of Contents

Overview of Appium

Appium is an Open-Source framework that is used to Automate Mobile Application Testing. It provides a versatile and efficient framework for running Automation Tests for Mobile Applications on Android and iOS platforms. While most of the Automation tools for Testing are platform-specific, Appium aims to enable software automation testing on different platforms under a single interface. It can facilitate the automation of many app platforms, such as Mobile, Desktop, and Browsers.

The Appium Tool is based on the WebDriver Protocol, a widely adopted protocol in the Web Automation Domain to Interact with Mobile Devices. Appium Supports various Programming Languages such as Python, JavaScript, or Java to write the Test scripts. This article helps you understand Appium, its main features, and its step-by-step installation on Ubuntu.

If you want to enrich your career and become a professional in Appium, then enroll in "Appium Training". This course will help you to achieve excellence in this domain.

Features of Appium

Before installing it in the Ubuntu System, let's see some of its features.

  • Cross-Platform Compatibility: Appium provides a cross-platform interface under a single standard API that enables all platform-specific automation in one place.
  • Open Source Platform: Appium is an open-source tool under the Apache 2.0 license. It can receive contributions, and thus, it has robust community support.
  • Support for Multiple Programming Languages: Appium Scripts can be written in Java, Ruby, JavaScript, Python, and many other programming languages, making it a diverse Automation Framework. 
  • Real User Interaction: With Appium, user interactions can be simulated, which enables the Testing of applications based on real-time user scenarios.
  • Testing of Native, Hybrid, and Mobile Apps: With Appium, you can perform Testing of Native Applications (Platform Specific Apps), Hybrid Applications ( including both Native and Web Components), and Mobile applications ( Web applications running on Mobile Browsers).

Prerequisites to Install the Appium

Appium is built on top of Node.Js, a JavaScript Framework to run JavaScript on the local machine. So, you need to install the Node.Js first on Ubuntu. To install the Node.Js, open the Terminal on your Ubuntu Screen and type the below commands:

sudo apt update

Here, the command ‘sudo apt update’ updates your package lists and refreshes the package information from all the sources configured on the machine. The critical point here is that Appium has the following requirements:

Node.js version

To install the specific version of Node.Js, Follow the below steps:

nvm command

Step 1: Install NVM (Node Version Manager) using the below command:

The terminal should be as shown below:

Terminal

[ Learn How to Install Node.js? ]

Step 2: After this, load the NVM on the terminal session you are working in.

source ∼/.nvm/nvm.sh

The console appears as depicted.

Console

Step 3: Using the nvm command, install the Node version greater than 14.x :

nvm install v14.17.0

The installation of NVM begins as illustrated below:

NVM Installation

Step 4: Now, install the npm version 8 using the following command:

npm install-g npm@8

The terminal shows the status of the npm installation as shown below:

NPM installation status

You have installed the right version of NodeJS and NPM on your machine now. The installation time depends on the speed and performance of nodeJS and NPM. You can install Appium on Ubuntu soon after Node.js and NPM are installed.

MindMajix Youtube Channel

How to Install Appium on Ubuntu?

Step 1: In the terminal, type the below command to install the Appium Server on your Ubuntu System:

sudo npm install -g appium

Here, ‘-g’ means the package will be installed globally on your machine. The interface would appear as outlined below:

Package installation interface

Step 2: Install the dependencies required for Appium Server:

You need to install some dependencies for the Appium server to run successfully on your system. The step-by-step procedure below will help you install dependencies to run the Appium server for software automation.

(i) You need to install the Andriod debug bridge (ADB) first. ADB is essentially a command-line tool. This tool helps you interact with Android devices and emulators since Appium needs Android devices for communication.

sudo apt-get install adb

The installation of dependencies would begin as demonstrated below:

Installation of dependencies

(ii) You can download and install OpenJDK 8. It is nothing but a Java development kit version 8. Appium uses Java for some requirements. 

sudo apt install openjdk-8-jdk

The installation of JDK will begin as shown below:

Installation of jdk

(iii) Next, install the Qt5 widget library for graphical user interfaces and some other additional Qt5 libraries that Appium may require for specific features and capabilities. Type the below commands to do this:

QT5 widget library

The terminal should resemble as shown below:

terminal

Step 3: Verify Appium Installation on Ubuntu:

To verify the installation of Appium Server on Ubuntu, we need to install Appium Doctor on the system. Appium Doctor helps to check whether the dependencies required for the Appium server are satisfied. It is also used to diagnose and fix common issues in the configuration.

To install Appium Doctor, type the below command in the terminal:

sudo npm install -g appium-doctor

The console shows the installation process as follows:

Appium installation process

After this, type the below command in the terminal. It will show the status of the Appium environment on your Ubuntu System.

appium-doctor

The diagnostic information about the Appium Environment turns up as depicted below:

Appium environment

Step 4: Start the Appium Server:

Run the command ‘appium’ on the Terminal, and you will see the appium server started and running on the system. By default, the appium server starts on port 4723. The Terminal shows the Appium Server Running as it is demonstrated below:

Appium server

[ Learn Appium Interview Questions and Answers ]

Appium Installation FAQs

1. What is the main advantage of Appium over other Automation Tools? 

The main advantage of Appium is that it supports the automation of different platforms under one standard interface.

2. What are the requirements to Install Appium on Ubuntu?

The key requirement for Appium is nodeJS version 14.17.0. also, you can use the versions 16.13.0 or 18.0.0 or above. It should be used along with the NPM version or higher.

3. What Ubuntu Version is required for Appium?

Appium is compatible with various versions of Ubuntu. However, it is advised to read the official documentation of Appium before the installation process. 

4. Can I run Appium tests on real physical devices connected to my Ubuntu machine?

Yes, Appium testing can also be done on physical devices. You must set up the necessary drivers and other configurations for the devices connected to your Ubuntu Machine to run the Appium tests. 

5. What are the Programming Languages on which Appium scripts can be written?

You can write Appium scripts in languages like Java, Ruby, Python, JavaScript, etc.

[ Learn How to Install MongoDB on Windows? ]

Conclusion

Appium offers efficient and flexible automation testing of Mobile Applications across different platforms, such as Android and iOS. It also ensures quality and end-user satisfaction and enables users to Automate the Testing of Native, Hybrid, and Mobile Applications. Offering cross-platform compatibility also reduces the cost of maintaining multiple test suites for different platforms.

Now, you have installed the Appium Server on Ubuntu. The Ubuntu version on which the above installation of Appium has been done is version 20.04. The steps mentioned above may vary slightly as the version of Ubuntu changes. You can now streamline your automation for software processes using the real-time simulation Appium offers. If you want to gain more knowledge of Appium, you can check out MindMajix's Appium training. You can get certification and accelerate your career.

Course Schedule
NameDates
Appium TrainingOct 15 to Oct 30View Details
Appium TrainingOct 19 to Nov 03View Details
Appium TrainingOct 22 to Nov 06View Details
Appium TrainingOct 26 to Nov 10View Details
Last updated: 23 Feb 2024
About Author

Viswanath is a passionate content writer of Mindmajix. He has expertise in Trending Domains like Data Science, Artificial Intelligence, Machine Learning, Blockchain, etc. His articles help the learners to get insights about the Domain. You can reach him on Linkedin

read less