Sunday, 30 March 2014

Robotium - A better choice amongst all other Android Automation tool

Android application developers find it extremely important to ensure that only a thoroughly tested Android app gets released in the market. With so many different devices running a variety of potential version of Android OS, it may become particularly difficult to make sure that the app is running properly on every device. Nevertheless, it is important that the users find the app smooth and give lots of stars to generate downloads. Thorough unit testing is trusted by many software developers for that. There are many places that have an amount of unit testing but implementation is quite an important step as well, so that they can ensure that the app is functioning just the way they expect it to. The unit tests must be written early on so that you plan the objects while coding; it also forces the resolution of ambiguities.

Android testing with robotium, Android automation testing, robotium testers
Another Android automation tool often used is MonkeyRunner which uses a Python implementation in Java, known as Jython for walking through the applications. It is best used when you want to walk through multiple emulators or devices. Its approach is not based on pass or fail testing; rather it walks through the application and clicks on buttons to take screenshots throughout, at designated points. After the running of the script, the screenshots can be compared with the ones that you had expected to see to find out the problems. This is a very easy approach but its main problem is its lack of a tight UI integration.

There are several other evaluation tools but amongst the various Android Automation tools, the most loved as well as trusted is the Robotium. This test framework is meant for the creation of easily written, robust as well as powerful automatic test cases for applications. Robotium helps test case developers write functions, acceptance and system test scenarios that cover multiple Android activities. By virtue of this, further details related to the implemented classes or structure of Android apps are not needed by test developers. The main class name along with the path linking it, are all that is needed. Full support is provided by it for the testing of hybrid as well as native applications.

Installing as well as using Robotium is extremely easy. It can be downloaded as single JAR file and then placed in whichever folder you want. To use it, you only have to put the JAR in the test project's classpath. Several differently build automation tools can use it. In fact, it may be used for both application testing with the source code available as well as for applications where just apk is available. To use it, just create Android test project to add test class.

Robotium usage has the following benefits as well as features:

  • Powerful tests cases can be quickly written even with very little information about the application that you will be testing.
  • APIs are offered so that direct interaction can be done with UI controls in the application.
  • Android 1.6 as well as above versions are officially supported by it.
  • Robotium does not modify the Android platform.
  • Command prompt may be used for the execution of the test.
  • Smooth integration of the framework may be done with Ant or Maven, helping in the addition of the framework to build the automation process of the project.
  • Screenshots may be captured as well.
  • There is no need for source code.
  • Other measurement tools for code coverage like Emma and Cobertura can work with this.
  • Quick implementation can be done.
  • The test case can be read prominently when compared to other tests.

Robotium testing may also have certain shortcomings but despite those, the list of benefits is quite lengthy, making it a much-loved automation testing tool. Currently, it can be said to be the best Automation Testing Framework with many open source developers contributing to the introduction of many newer as well as better features in it to enrich the user experience even further. Android testing with Robotium can be executed with a customizable framework based on clients’ needs.


We provide Android automation testing services. If you would like to get your application tested by our certified Robotium testers, please contact us at Mindfire Solutions.

No comments:

Post a Comment