Mobile Automation Testing using APPIUM tool

Mobile Automation-Testing-Appium

As everyone knows the mobile usage is growing drastically. Tons of new mobile applications are coming out daily. While serving the development and testing needs of these companies, we use automation with respect to manual testing. Please find below few pointers that might help you upgrade yourself to automate your testing efforts.

 

# Why we need Automation in Mobile Testing?

  • Target Multiple Mobile Devices and O.S. versions – It is time taking and redundant activity for all of us to test a single feature on each and every device variants
  • Different Mobile App Types like native, hybrid and web – Each app type’s behavior from installation to functionality is different from one another, hence their testing and test coverage will also be different
  • Through automation, one can achieve better test coverage resulting in better test outputs

 

# What are the different tools available?

There are multiple tools available in market, let’s see below comparison to understand in one stretch

 

Image

By comparing and analyzing with various tools, we have chosen Appium tool which is Best Fit to our requirements.

 

# Why Appium?

  • It is open-source software automation tool which is used to automate Android and IOS platform apps.
  • Appium is “cross-platform” automation tool so you can write software automation tests against iOS and  Android (multiple platforms) using the same API.
  • Allows native, hybrid and web application testing
  • It supports given multiple platforms and languages. Appium supports below-given languages with the Selenium WebDriver API and language-specific client libraries. Like: Java / Objective-C / JavaScript with Node.js / PHP / Python / Ruby / C#
  • Also, you can use any testing framework like for JAVA – TestNG / Junit  to run test scripts
  • It supports automation test on physical devices as well as on emulator or simulator both
  • Large community support and Forums available

 

Add on features you can achieve and integrate with test automation –

  • Reporting test result through email after all tests executed
  • Screenshots and Logs – Refer and analyze any issues occurred in test execution if any test fails

 

# What are the advantages of Appium tool?

  • Appium can make your mobile app regression and smoke testing task easy. Especially for large mobile apps where continues apps are updating with new features and functionalities.
  • You can run high priority test cases regularly before every release and get immediate feedback
  • You can write your tests against iOS and Android platforms enabling code reuse between test suites on same platforms. But you still need separate iOS and Android scripts, because the UI elements are different on the both platforms.
  • Create test once and run on multiple devices and O.S. versions.

 

# Can we measure automation test progress?

The ROI (Return On Investment) from test automation can be easily measured by taking a before and after scenario. You can simply ask few questions with yourself and check the progress.

  • Has the dependency on QA efforts decreased?
  • How many old issues occurred after consequent app releases?
  • Now with automation has the test case coverage increased?

 

# How Appium works?

  1. Appium is an ‘HTTP Server’ written using Node.js platform and drives iOS and the Android session using Webdriver JSON wire protocol. Hence, before initializing the Appium Server, Node.js must be pre-installed on the system.
  2. When Appium is downloaded and installed, then a server is set up on our machine that exposes a REST API.
  3. It receives connection and command request from the client and executes that command on mobile devices (Android / iOS).
  4. It responds back with HTTP responses. Again, to execute this request, it uses the mobile test automation frameworks to drive the user interface of the apps.

 

unnamed

High-level points required to run test script using Appium

  • Appium Inspector which is available only on MAC provides you to locate all UI elements on screen
  • UIAutomatorViewer – This tool is used to Locate all UI elements on screen on Windows
  • Create test scripts in any IDE like eclipse using available bindings for Appium
  • Run test script using any test framework like TestNG for JAVA
  • In TestNG, you can refer emailable report which is generated automatically once all test scripts execution completed

 

# Are there any Limitations of APPIUM?

  • Appium does not support testing of Android Version lower than version 4.2 (API level 17)
  • Limited support for hybrid app testing. eg: not possible to test the switching action of application from the web app to native and vice-versa.
  • No support to run Appium Inspector on Microsoft Windows.

 

Till now, we have a basic idea about Appium tool in mobile application testing. We will focus in details on Installing and executing test on Automation testing on Android using Appium in the upcoming article.