The transition of testing web applications to mobile based applications is a daunting one. The sheer variability introduced by the mobile based devices, operating system, screen sizes, makes it a way more complicated than testing a mere web application.

Couple of things, which I would want to highlight here:

  • Never ending screen size and form factors
  • Apps hosted in a sandboxed environment and very limited inter process communication
  • Network Challenges
  • Usability aspect of mobile and the complexity in terms of navigation
  • Lack of easy to use API

A lot of solutions for functionally testing mobile applications are available out there in the market. In here we will be discussing Appium, the most commonly used open source test solution in the area of mobile functional testing.

What is Appiumappium

 

Appium is an open source test automation tool for mobile applications. It allows you to test all the three types of mobile applications: native, hybrid and mobile web. It also allows you to run the automated tests on actual devices, emulators and simulators.

Today when every mobile app is made for at least two platform iOS and Android, you for sure need a solution, which allows testing cross platform. Having two different frameworks for the same app increases the cost of the testing and time to maintain it as well.

The basic philosophy of Appium is that you should be able to reuse code between iOS and Android, and that’s why when you see the API they are same across iOS and android. Another important thing to highlight here is that unlike Calabash, Appium doesn’t modify your app or need you to even recompile the app.

Appium let’s you choose the language you want to write your test in. It doesn’t dictate the language or framework to be used.

Architecture

So how does Appium do all this? Let’s try to understand what happens behind the scenes.

When you download the Appium app you are basically downloading the server. The server is written in Node.js and implements the Selenium WebDriver. It allows one to use available WebDriver client to fire your tests. And then your mobile app acts precisely like a web app where the DOM is represented by View hierarchy.

So this server basically exposes REST api which performs the following actions:

  • Receives connection from client
  • Listen command
  • Execute command
  • Respond back the command execution status

In terms of architecture diagram, below is how Appium can be explained-

appium architecture

System Installation

Before installing Appium, you need to get few other things in ecosystem:

 

In the next series, we will see how to set up the individual component, and make the system ready for testing android based application using Appium as the tool.