Mobile Testing Automation Framework – Choose The Right One

Finding the right mobile testing automation framework is the key for getting your automated process right.

TestObject supports three of the most important open-source automated UI testing frameworks: Appium, Robotium and Espresso. These frameworks are very popular and they are supported by a very strong and active community. 

Continue reading to get to know those three frameworks in detail and more!

Choose the right mobile testing automation framework

Appium

Appium - mobile testing automation framework

Appium is an open source cross-platform test automation framework to use with native, hybrid and mobile web apps.

It drives iOS and Android apps using the WebDriver JSON Wire Protocol. It’s a black-box testing tool, no need for the source code.

The idea behind Appium that testing native apps shouldn’t require including an SDK or recompiling the app. You should also be able to use test practices, frameworks and tools you prefer.

With Appium you can automate any mobile app from up to now many languages and many test frameworks with full access to back-end APIs and DBs from test code.

 

Pros:
  • Cross-platform open source mobile testing automation framework
  • You can use with native, hybrid or mobile web apps
  • Client libraries: Python, Java, JavaScript, Ruby, PHP, C#
  • Doesn’t require access to your source code or library
  • Compatibility with many CI environments
  • Has a strong community
Cons
  • On iOS you can only run one test at a time per Mac
  • Limited support for gestures (even though you can write JavaScript wrappers for more gestures)
  • Limited support for Android < 4.1
  • It takes a long time to configure Appium for both Android and iOS

 

Watch our webinar on how to “Automate you Appium tests like a pro” and to learn more about this framework with our test automation engineer, Giovanni Rago!

 

Robotium

Robotium - mobile testing automation framework

Robotium is an open source mobile testing automation framework for native and hybrid Android apps.

With it’s very easy to write powerful a robust automatic black-box UI tests for apps: you just need the .apk, no source code is needed. You can also run gray-box tests if the source code is available.

It provides simple API to write UI automation scripts. Robotium is in fact one of the most commonly used automated UI testing framework. 

Pros:
  • Simple API to write UI automation scripts
  • Open source Android framework for native and hybrid apps
  • Black-box and grey-box tests
  • No need for the source code, just the .apk
  • Easy integration with CI Maven, Gradle and ANT
Cons:
  • Requires knowledge in coding with Java
  • Maintenance is high, e.g. you’ll probably lose 90% of your code with a UI refresh (very common in mobile apps)

 

 

Espresso

Espresso - mobile testing automation framework

Espresso is an open source mobile testing automation framework for native Android apps developed by Google. The executed test .apk is synchronised by the framework with the Android UI thread.

Espresso has a small, predictable, easy to learn API and it is built on top of the Android instrumentation framework.

This framework allows white-box tests written in Java, using the Hamcrest matchers to simplify the reading and writing of test scripts.

 

Pros:
  • Open source framework for native Android apps
  • Easy to set up and easily extendable
  • Provides a rich debugging information when a failure happens
  • Is supported on all API versions
Cons:
  • Very small, not very active community
  • Lack of documentation

 

This slide-show presents the most common frameworks with their characteristics:

Written by

Ely Hechtel

Topics

Mobile testingFrameworks