ROBOTIUM – Best Testing Framework for Android
Audio : Listen to This Blog.
Robotium is a test framework created to make it easy to write powerful and robust automatic black-box test cases for Android applications that are followed during the process of
android application development
. With the support of Robotium, test case developers can write function, system and acceptance test scenarios, spanning multiple Android activities. The framework is released under Apache License 2.0. Its founder and main developer is Renas Reda.
Robotium can be used both for testing applications where the source code is available and applications where only the APK file is available and the implementation details are not known. Robotium can be used with all the different build automation tools. Robotium is similar to Selenium, but for Android. It has support for Android features such as activities, toasts, menus and context menus.
Even though both Robotium and Monkeyrunner are the best testing frameworks for android apps, but according to performance evaluation report of both frameworks “Robotium” ranks 7.86 whereas “Monkeyrunner” ranks 7.71. So, Robotium can be more useful than Monkeyrunner.
Robotium provides the following benefits:
• You can develop powerful test cases, with minimal knowledge of the application under test.
• Allows user to test more flexible and convenient for analyzing results.
• Robotium allows us to take screenshots anywhere in the test (both for Emulator and Device) and save it to device internal memory or SD Card or Emulator
• The framework handles multiple Android activities automatically.
• Minimal time needed to write solid test cases.
• Readability of test cases is greatly improved, compared to standard instrumentation tests.
• Test cases are more robust due to the run-time binding to GUI components.
• Blazing fast test case execution.
• Automatic timing and delays.
Limitations of Robotium:
• Tied to JUnit 3 Instrumentation on device.
• Tied to one app process.
• It can’t work with different Applications in on test – if your application call another one (like Camera) – Robotium can’t “see” it and press any buttons there.