Automating Android App Testing

By: Unknown, November 13, 2012
By- Eva Zaremba (bio at the end of the article). Have an idea? Click here to guest post.

Before we go into the details of automating Android App Testing, it is important to understand why exactly this testing needs to be carried out. There are several reasons which make it necessary to carry out thorough testing of Android applications. To begin with there are so many devices available, all which carry various versions of Google’s Android’s operating system. It is crucial to keep consumers happy and what better way to do this than by testing Android apps before they are released.

Automated Android app testing tools include Robolectric, MonkeyRunner and Robotium. LessPainful provides this automated testing on the actual device itself.
   Robolectric: This automated testing framework does not rely on the testing functionality provided by Android. This automated testing tool instead makes uses of shadow objects. It runs tests on server JVM or a regular workstation. By doing this, Robolectric reduces the time required to perform such tests. This is due to the fact that this type of automated Android app testing avoids deploying, packaging, dexing and running the tests on either a real device or an emulator.

2.       Robotium: This is another automated Android testing framework that can be used. This kind of testing tool works together with the testing support provided by Android. This is possible via the InstrumentationTestRunner. Robotium is an excellent UI test tool. It acts like a user, therefore it views what the user views, and it can tap around the gadget the way a user would possibly do. Robotium provides acceptance, functional and system tests which run across several activities. You can also run continuous integration tests with Robotium as it is integrated with Ant and Maven.  This automated Android app testing tool supports Menus, Activities, Context Menus, Toasts and Dialogues for Honeycomb as well.  The biggest advantage that Robotium has is that it provides superb control of views and awards either a fail or pass result for each view.

3.       MonkeyRunner: MonkeyRunner is included in the Android SDK. It is fairly similar to the Robotium testing app for Android applications but it slightly different.  MonkeyRunner makes use of the Jython script to test the applications. Jython is a Python implementation in Java. The MonkeyRunner tool has APIs to connect it to a device, running apps, installing and uninstalling apps. It also runs tests against applications. Further, MonkeyRunner also compares images on the screen to see if the correct images are on it after a particular command has been executed. MonkeyRunner is also excellent for handling multiple devices and emulators. It does not grade a test but takes screenshots at specific designated points.

4.       LessPainful: LessPainful has gone a step ahead from the three above mentioned testing frameworks for Android apps. LessPainful provides automated testing of apps on actual multiple devices. The user has to upload the app as well as the test file written in Cucumber. The user then has to select the devices he wants to test. The selected tests are automatically checked and the user is provided with a report. Devices which support this app include Sony Xperia, Garmin Asus, Samsung Galaxy among others.

So there you have it, some of the best automated Android app testing frameworks that are available today.

This is a guest post by Eve Zaremba of xfinityonline, a site that offers savings and current information on xfinity internet. 

No comments:

Post a Comment

What do you think? Share a comment!


fb twitter google rss youtube