Appium is an open-source framework to automate testing of your web, native, and hybrid apps on different platforms like Android, iOS, and Windows.
Developed by Dan Cuellar and Jason Huggins, Appium is an automated testing tool for web, native, and hybrid applications. It is supported on different mobile operating systems like Android, iOS, and Windows. When writing this article, Appium has about 15.3K Star and 5.7K Fork on GitHub.
Appium is a cross-platform tool that allows you to write UI tests for multiple platforms like Android, iOS, and Windows while using the same API. As a result, it enables code reuse between Android, iOS, and Windows test scripts or suites.
Like Selenium, Appium supports different programming languages and frameworks for mobile automation testing like Java, JavaScript, Python, PHP, C#, etc.
With the Appium framework, you can run app test automation of,
Want to know more about Web, Hybrid, and Native apps? Take a look at our comparison of Web vs Hybrid vs Native Apps.
It is no secret that the mobile industry is growing rapidly. To ensure faster application delivery, organizations heavily rely on mobile automation testing. According to a survey, Appium holds sway in the mobile domain, with 35% of organizations preferring it over other free or open-source test automation tools.
In addition to Appium, many other open-source tools are available for automating mobile testing. However, to communicate with native mobile apps, most tools require an additional agent to compile most of the application code. Unlike other tools, Appium enables communication between different apps and does not require your app to include any extra agents.
Shown below are the pointers that keep Appium ahead of other mobile test automation tools -
This section of Appium testing tutorial talks about the history of the Appium framework.
In 2011, Dan Cuellar was the Test Manager at Zoosk when he encountered an issue. In the iOS product, the number of test passes was becoming excessive. He realized that automation was the solution to this problem. Dan examined the existing tool landscape. However, he was not satisfied with the existing options. Instead, he requested more time from his manager to see if he could find a better way. Then iOS Auto was developed.
Selenium Conference 2012
At Selenium Conference 2012 in London, Dan demonstrated iOS Automation testing using Selenium syntax to show writing platform-agnostic tests that use distinct platform-specific page objects with a standardized interface. Jason Huggins, co-creator of Selenium, moderated the sessions.
Meet Up
Jason approached Dan four months after the Selenium Conference. Jason convinced Dan to make his code available under an open-source license. Dan released the source code in C# on GitHub in August, followed by a new version in Python. Jason installed a web server in September and began implementing the WebDriver wire protocol over HTTP, allowing iOS Auto to be scripted from any Selenium WebDriver client library in any programming language.
Mobile Testing Summit
Jason decided to present the project at the Mobile Testing Summit in November, but he recommended that it be given a new name first. They chose AppleCart after considering several options. After reading Apple's copyright and trademark guidelines, Jason observed that the first term Apple would defend its rights against was "AppleCart." Jason and Dan then chose the new name Appium - Selenium for Apps.
Appium Across The Globe
At the 2013 Google Test Automation Conference, Appium made its debut in its current form. That same year, Appium was showcased in the United States, England, Poland, Portugal, and Australia at conferences and meetups. Appium became the first cross-platform automation framework when it added Android and Selendroid support in early 2013.
Introduction To Appium 1.0
Appium began to mature and expand significantly. Appium 1.0 was launched in May 2014, marking a turning point in the project's evolution. Appium received numerous honors and became the most popular open-source, cross-platform mobile automation framework. Appium received the 2014 InfoWorld Bossie award for the best open source desktop and mobile software. Black Duck Software also named Appium an Open Source Rookie of the Year.
Appium was redesigned from the ground up, utilizing a more contemporary version of the JavaScript language and rebuilding the architecture so that users and third-party developers can easily create their own Appium drivers.
As far as Selenium and Appium are concerned, both are open-source automation testing tools. Selenium enables automated browser testing across different browsers and operating system combinations by automatically controlling browser actions, whereas Appium involves automated app testing of native, web, and hybrid apps.
But Appium is based on Selenium and uses JSON WireProtocol internally to interact with Android and iOS apps via Selenium WebDriver. Appium's architecture consists of a Node.js HTTP server that creates and manages multiple WebDriver sessions. Appium launches tests on the device and waits for commands from the Appium server. It is similar to the Selenium server, which receives HTTP requests from Selenium client libraries.
This section of the Appium testing guide sheds light on the Appium framework's architecture. The Appium Architecture consists of three components -
In this section of Appium testing tutorial, we will deep dive into the working of Appium framework.
Appium is a Node.js HTTP server that uses the REST API. The client interacts with the Appium server through REST APIs, which are controlled by the Mobile JSON Wire Protocol. The REST APIs accept client connections, listen for commands, execute commands, and send back the command execution status.
Appium works differently on platforms like Android and iOS. In the next section of this Appium testing tutorial, we will look at how Appium works on Android and iOS.
Appium Client libraries convert the test commands to the REST API requests with the help of the Mobile JSON Wire Protocol. The Appium server forwards these requests to the Android device or emulator. The Android device contains the bootstrap.jar files. The bootstrap.jar file interprets these test commands. The bootstrap.jar file uses Selendroid or UI Automator to execute the requests on the Android device.
The results of the tests are then sent to the Appium server, which sends an HTTP response (containing status codes) to the Appium client.
Appium Client libraries convert test commands into REST API requests using the Mobile JSON Wire Protocol. The Appium server forwards these requests to an iOS device or simulator. The iOS device contains the WebDriverAgent.app files. WebDriverAgent.app interprets these test commands. WebDriverAgent.app uses XCUITest to execute requests on iOS devices.
The results of the tests are then sent to the Appium server, which sends an HTTP response (containing status codes) to the Appium client.
Before automating your apps using Appium, make sure to install the following things on your system.
You can install Appium in two ways -
Installing Appium through NPM: You will need Node.js and NPM to run Appium through npm install. You can use nvm, n, or brew install node to install Node.js.
You will likely encounter problems installing Node or Appium with sudo (or root). Appium supports Node.js 12+, so we recommend using the latest stable version.
To install Appium through NPM, run the following command in the terminal:
npm install -g appium
Installing Appium through Appium Desktop: You can download the latest version of Appium Desktop from the Appium Release page. If you want to know more about Appium Desktop, head over to our guide on Appium Inspector.
The next section of this Appium testing guide focuses on how to install Appium on Windows and macOS.
Shown below are the following steps for installing Appium on your Windows machine.
When the project is successfully rebuilt, it indicates that you have installed Appium on your system using Android Studio.
Shown below are the following steps for installing Appium on your Mac machine
vim ~/.bash_profile
export JAVA_HOME = $(/usr/libexec/java_home)
export PATH = $JAVA_HOME/bin=$PATH
export PATH = /usr/local/bin:PATH
source ~/.bash_profile
/usr/bin/ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew doctor
xcode-select --install
Shown below is the limitation of the Appium framework.
This section of Appium testing tutorial covers some unexpected errors that you may encounter while performing Appium testing of mobile applications. Here is a list of common Appium errors and how to fix them.
/.profile
, /.bash_profile
, or ~/.bashrc
.Yes! The learning curve of Appium is quite simple and easy. It employs the remote WebDriver protocol and supports various languages and frameworks. You can begin your Appium testing journey if you have good experience writing tests in languages like Java, Python, PHP, C#, and others.
Please refer to our Appium testing tutorial for more information on the essentials of Appium.
Appium is an excellent framework to include in your test automation plan. However, it is critical to conduct Appium testing effectively. Setting up, running, and scaling in-house device labs is costly. This demands the use of a real device cloud platform like LambdaTest. With LambdaTest online device farm, you can get rid of your in-house device labs and allow your developers and testers to conduct Appium testing on real devices from anywhere at any time.
LambdaTest is a leading test execution and orchestration platform that is fast, reliable, scalable, and secure. It allows users to run manual and automated testing of web and mobile apps across 3000+ browsers, operating systems, and real device combinations. Using LambdaTest, businesses can ensure quicker developer feedback and hence achieve a faster go-to-market. Over 500 enterprises and 1 Million + users across 130+ countries rely on LambdaTest for their testing needs.
To start Appium testing on LambdaTest, you can refer to our Appium testing support documentation for a step-by-step procedure for running your first Appium test script on a cloud Appium Grid. So you don’t have to worry about the challenges with Appium infrastructure as we will provide you with a cloud Appium Grid with zero downtime.
Want to know a fun fact? Your first 100 Appium testing minutes are on us with just a free sign-up. In addition, you can also avail benefits of manual cross browser testing, manual app testing, Visual UI testing, responsive testing, and more with a lifetime of free access to LambdaTest, the world’s fastest-growing test orchestration, and execution platform.
Ready to automate your apps using Appium? To get started, watch our Appium testing tutorial video.