Appium: A Mobile Application Testing Automation Tool

Posted by   June 2nd, 2016

Facebooktwitterlinkedinmail

According to the Economic Times, India is set to have 651 million smartphones, and 18.7 million tablets by 2019. The trend of shifting towards mobile phones has been exponentially increasing over the past decade, resulting in reduced traffic at the websites. The current situation is such that, there are rapid changes in the mobile projects, but we do not have appropriate testing tools for mobile projects, as compared to their desktop counterparts. This mobile testing strategy is comparatively difficult to define.

Tech Vedika is working on developing several mobile apps for a  wide range of clients across the globe. To ensure the quality of the mobile app product, these days there are multiple techniques used for testing of mobile applications. One such open source test framework for mobile app testing is Appium.

Appium is a mobile app UI test automation tool developed and supported by Sauce Labs. It drives iOS and Android apps using the WebDriver protocol. It is independent of the Operating System of the mobile device. It can test native and hybrid mobile app as well as web applications. It supports automation tests on physical devices (iOS, Android, FirefoxOS) as well as emulators (Android) and simulators (iOS, FirefoxOS). It also offers cross-platform application testing. There are many other automation tools available in market, such as –  Frank, MonkeyTalk, Calabash; but most of these tools have to recompile the app so that the tool can interact with the mobile app, out of all these tools Appium stands more useful.

Client/Server Architecture

Appium is a HTTP server handling multiple Web Driver Sessions. Appium client establishes connection with Appium server through JSON Wire Protocol. It receives connections from a client, listens for commands, executes those commands on a mobile device, and responds with an HTTP response representing the result of the command execution. Each platform (Android and iOS) has a different mechanism to run a test case based on the commands from the Appium server.

Appium in Android

Appium client connects with Appium Server through JSON Wire Protocol. Appium Server creates a session for the client and checks the desired capabilities of client and connects with frameworks like Selendroid/UIAutomator, which will then communicate with bootstrap.jar running in a Emulator/Real device for performing client operations. Bootstrap.jar act as a TCP server to perform action on our AUT (Application Under Test)

Once the command is executed the client sends back the message to the Appium server which logs everything related to the command in its console. This cycle keeps going till the time all the commands gets executed.

Appium

Appium in IOS

Appium client connects with Appium Server through JSON Wire Protocol. Appium Server  creates a session for the client and checks the desired capabilities of client and connects with UIAutomation/Instruments, (Apple provides this application called ‘instruments’ which is used for multiple purposes like profiling, controlling and building iOS apps) which will then communicate with bootstrap.js running in Simulator/Real device for performing client operations. Bootstrap.js acts as a TCP server to perform action on our AUT (Application Under Test)

Once the command is executed the client sends back the message to the Appium server which logs everything related to the command in its console. This cycle keeps going till the time all the commands gets executed.

Limitations of Appium:

  1. No support for Windows mobile apps
  2. No Support for Android API level < 17.
  3. Limited support for gestures.
  4. No support for Toast messages.

Reference:

Leave a Reply

Your email address will not be published. Required fields are marked *