Blog_Banner_Asset
    Homebreadcumb forward arrow iconBlogbreadcumb forward arrow iconFull Stack Developmentbreadcumb forward arrow iconAppium Architecture for Mobile Application Testing

Appium Architecture for Mobile Application Testing

Last updated:
26th Jun, 2020
Views
Read Time
6 Mins
share image icon
In this article
Chevron in toc
View All
Appium Architecture for Mobile Application Testing

Appium Overview

Appium is a free mobile application testing tool/framework that provides automation for iOS and Android mobile applications. Appium is a client-server architecture that accepts test code written in Java, Python, Ruby, JavaScript, etc.

At its heart, Appium is a web server written in Node.js programming language that creates iOS and Android sessions using JSON wire protocol. 

Check out our free courses to get an edge over the competition.

Appium Server Performs the Following Actions

  • Receives a connection from the client in the form of a JSON object over HTTP
  • Initiate a session and then returns the session ID
  • Listens for the commands issued
  • Executes these commands on a mobile device
  • Responds with an HTTP response

Check out upGrad’s Advanced Certification in Cloud Computing

Ads of upGrad blog

Source

Appium Key Concepts

Before diving deep into the Appium architecture, let us first understand the key concepts associated with the Appium architecture.

Appium Client

Appium client is an automated scripted code written in any language you are comfortable with (like PHP, Java, Phyton, etc.). Appium client holds the configuration details of the mobile device and the application along with the logic/code to run the test cases.

Check out upGrad’s Advanced Certification in Blockchain

Appium Server

Appium server is an HTTP server written in Node.js programming language that receives connection and command requests from the Appium client in a JSON format and executes those commands on a mobile device. Appium Server is started before invoking the automation code.

The server interacts with iOS and Android platforms and creates a session to interact with end devices of mobile applications. 

Explore our Popular Software Engineering Courses

Read: Top 20 Trending Android Project Ideas & Topics For Beginners

End Device

The end device is mostly a real-time mobile device or an emulator. The automated scripts are executed in the end device by the Appium server by the client’s commands.

JSON Wire Protocol

In Appium architecture, the JSON wire protocol is a transport mechanism used to establish communication between the Appium client and the Appium server. This protocol controls the behavior of different mobile devices over a session. It is a set of pre-defined endpoints exposed via RESTful API. For example, if a client wants to send data to a server, the client converts it into a JSON object and pushes it to the server. The server then parses the received JSON object and converts it back to the data for use.

upGrad’s Exclusive Software Development Webinar for you –

SAAS Business – What is So Different?

 

Appium Architecture

Let us now understand the Appium architecture.

As mentioned above, the Appium server is an HTTP server that reads the HTTP requests from the client libraries in a JSON format and sends these requests to the appropriate platform. The Appium server recognizes these requests and creates an automation session with the corresponding end device. Once the session is created, the Appium server starts the execution of test cases in the end device. 

Appium server handles the requests differently for iOS and Android, depending on the platform on which it is running. The following sections will explain how Appium runs commands differently on these platforms.

In-Demand Software Development Skills

Appium Working in an iOS Device

On an iOS device, Appium uses UIAutomation API (JavaScript library provided by Apple Company) to connect with the application’s user interface elements. 

The above Appium iOS architecture figure describes the Appium architecture for iOS automation. Let us decode the iOS Appium architecture figure step-by-step:

  • The Appium client communicates with the Appium server using the JSON wire protocol and sends the command in a JSON format to the server.
  • The server then establishes a connection with the client and forwards the request to the ICS (Instruments Command Server). Appium server also pushes a bootstrap.js file to the iOS device. ICC (Instruments Command client) then picks up the command and runs it in bootstrap.js file within the iOS device environment.
  • Once the above operation is completed, the executed command’s log details are sent back to the server by the client.

Appium Working in an Android Device

On an android device, Appium would use the UIAutomator framework developed by the Android developers to interact with the application’s user interface elements. The UI Automator is a framework used to test the user interface.

The above Appium Android architecture figure describes the Appium architecture for Android automation. The above figures replace bootstrap.js with bootstarp.jar. 

Ads of upGrad blog

Learn: Android SDK: A Detailed Tutorial for Beginners

Let us decode the Android Appium architecture figure step-by-step

  • The Appium client communicates with the Appium server using the JSON wire protocol and sends the command in a JSON format to the server.
  • TheAppium server then establishes a connection with the client and forwards the request to the ICS UiAutomator Controller. Appium server also pushes a bootstrap.jar file to the Android device. UiAutomator command the client then picks up the command and runs it in bootstrap.jar file within the Android device environment. 
  • Once the above operation is completed, the log details of the executed command are sent back to the Appium server by the client.

Also Read: Full-Stack vs Android Developer: Which Should You Choose

Explore Our Software Development Free Courses

Conclusion

Appium is undoubtedly one of the most popular platforms for mobile application testing. By far, you have learned about the overview of Appium architecture, workflow, and working of Appium on iOS and Android platforms. 

If you’re interested to learn more about full-stack software development, check out upGrad & IIIT-B’s PG Diploma in Full-stack Software Development which is designed for working professionals and offers 500+ hours of rigorous training, 9+ projects, and assignments, IIIT-B Alumni status, practical hands-on capstone projects & job assistance with top firms.

Profile

Rohan Vats

Blog Author
Software Engineering Manager @ upGrad. Passionate about building large scale web apps with delightful experiences. In pursuit of transforming engineers into leaders.

Frequently Asked Questions (FAQs)

1What is MAT?

Mobile Application Testing or MAT is the testing of a mobile application. MAT has shown to be quite beneficial, as it has improved the efficiency of testing and the execution of regression test cases. It also saves a lot of time while performing additional test cases and allows you to reuse the same test scripts over and over again. Finally, test scripts may be executed in parallel on several devices using MAT. It differs from Mobile Testing (MT) as MT focuses on the native application functionalities of mobile devices such as calling, texting, and media player. Meanwhile, in MAT, we concentrate solely on the application's operation and features.

2What do you mean by Appium?

Appium is a well-known open-source framework for testing mobile applications. It enables iOS and Android app developers to automate the testing of native and hybrid apps. Appium is not a stand-alone application. It uses the WebDriver interface to perform the test cases. QAs can use Appium to write test scripts in a variety of programming languages, such as Ruby, JavaScript, PHP, Java, Python, and C#. Appium is particularly popular because it is a versatile, cross-platform framework that allows testers to develop test scripts that are relevant to numerous platforms that utilize the same API, such as Windows, iOS, and Android. Appium users may essentially recycle their source code for both Android and iOS, saving time and effort in preparing for construction tests.

3What are the advantages of using Appium?

Appium provides testing web, supports cross-platform for Native and Hybrid mobile automation, accepts JSON wire protocol, doesn't always require modification of the app, allows automation tests on an actual device as well as simulators or emulators, and has no mobile device requirement. Regardless of the platform programmers are automating, such as Android or iOS, all of the intricacies of the testing are managed by a single Appium server. It makes way for cross-platform mobile testing, in which the same test may be run on several devices. To make your app automation-friendly, Appium does not require any additional components.

Explore Free Courses

Suggested Blogs

Top 7 Node js Project Ideas & Topics
31576
Node.JS is a part of the famous MEAN stack used for web development purposes. An open-sourced server environment, Node is written on JavaScript and he
Read More

by Rohan Vats

05 Mar 2024

How to Rename Column Name in SQL
46940
Introduction We are surrounded by Data. We used to store information on paper in enormous file organizers. But eventually, we have come to store it o
Read More

by Rohan Vats

04 Mar 2024

Android Developer Salary in India in 2024 [For Freshers & Experienced]
901325
Wondering what is the range of Android Developer Salary in India? Software engineering is one of the most sought after courses in India. It is a reno
Read More

by Rohan Vats

04 Mar 2024

7 Top Django Projects on Github [For Beginners & Experienced]
52110
One of the best ways to learn a skill is to use it, and what better way to do this than to work on projects? So in this article, we’re sharing t
Read More

by Rohan Vats

04 Mar 2024

Salesforce Developer Salary in India in 2024 [For Freshers & Experienced]
909197
Wondering what is the range of salesforce salary in India? Businesses thrive because of customers. It does not matter whether the operations are B2B
Read More

by Rohan Vats

04 Mar 2024

15 Must-Know Spring MVC Interview Questions
34760
Spring has become one of the most used Java frameworks for the development of web-applications. All the new Java applications are by default using Spr
Read More

by Arjun Mathur

04 Mar 2024

Front End Developer Salary in India in 2023 [For Freshers & Experienced]
902391
Wondering what is the range of front end developer salary in India? Do you know what front end developers do and the salary they earn? Do you know wh
Read More

by Rohan Vats

04 Mar 2024

Method Overloading in Java [With Examples]
26241
Java is a versatile language that follows the concepts of Object-Oriented Programming. Many features of object-oriented programming make the code modu
Read More

by Rohan Vats

27 Feb 2024

50 Most Asked Javascript Interview Questions & Answers [2024]
4386
Javascript Interview Question and Answers In this article, we have compiled the most frequently asked JavaScript Interview Questions. These questions
Read More

by Kechit Goyal

26 Feb 2024

Schedule 1:1 free counsellingTalk to Career Expert
icon
footer sticky close icon