View All
View All
View All
View All
View All
View All
View All
View All
View All
View All
View All
View All
View All

Appium Architecture for Mobile Application Testing

By Rohan Vats

Updated on Nov 14, 2022 | 6 min read | 8.5k views

Share:

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

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. 

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.

Coverage of AWS, Microsoft Azure and GCP services

Certification8 Months
View Program

Job-Linked Program

Bootcamp36 Weeks
View Program

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. 

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

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.

Frequently Asked Questions (FAQs)

1. What is MAT?

2. What do you mean by Appium?

3. What are the advantages of using Appium?

Rohan Vats

408 articles published

Get Free Consultation

+91

By submitting, I accept the T&C and
Privacy Policy

India’s #1 Tech University

Executive PG Certification in AI-Powered Full Stack Development

77%

seats filled

View Program

Top Resources

Recommended Programs

upGrad

AWS | upGrad KnowledgeHut

AWS Certified Solutions Architect - Associate Training (SAA-C03)

69 Cloud Lab Simulations

Certification

32-Hr Training by Dustin Brimberry

View Program
upGrad

Microsoft | upGrad KnowledgeHut

Microsoft Azure Data Engineering Certification

Access Digital Learning Library

Certification

45 Hrs Live Expert-Led Training

View Program
upGrad

upGrad KnowledgeHut

Professional Certificate Program in UI/UX Design & Design Thinking

#1 Course for UI/UX Designers

Bootcamp

3 Months

View Program