Monday 27 February 2017

Android Testing Frameworks

To effectively conduct mobile testing, the specialists can use special frameworks both for iOS and Android testing. These frameworks provide fast and detailed check of the mobile product. Not it is the time to review Robotium, a framework for Android-base applications.
The point is that the capacities of standard frameworks for Android are somehow limited:
  • they do not support multiple functions,
  • the test scripts are performed rather slow,
  • the structure of test cases is complex and it is difficult to launch them.
Robotium does not have such issues. It is an open-source framework. It is very suitable for developers as they can design the automatic GUI test scripts, functional and acceptance test scenarios for multiple operations.What Are the Main Features of Robotium?
  • Support multitasking
  • Simple test cases
  • Integration with IDE
  • High level of performance
  • High test coverage
There are two types of classes: Solo classes and ActivityInstrumentationTestCase2. With the help of Robotium, a tester is able to design test cases without being aware of the specifics of product system. In other words, he will perform black box testing. This particular feature signifies this checking framework from the other ones.How to Use Robotium for Android Testing?
  1. Install the library of the framework to the project under test.
  2. Create test cases using the method of Solo class.
  3. Run written tests on the required devices (OS version, model).
  4. Analyze the test results.
One more useful framework for Android products is Roboelectric. The testing procedure with this tool does not require a specific device or emulator. The specialists are able to run tests directly on JVM (Java Virtual Machine).What Are the Cons of Roboelectric?
  • High performance
  • High test coverage
  • Execution on JVM
  • Support black box testing
  • No mocking
  • Inflation of resource and views
Roboelectric supports the following functions: the creation of Shadow classes, the interception of the loading of Android classes, the usage of Javaassist, the binding of Shadow object to Android class. Due to all these options, the checking of the application does not require the actual Android environment.Nowadays, mobile testing is very widespread as the majority of users utilize mobile devices for various needs. Of course, there are a lot of other testing frameworks for checking Android-based application and programs. Among them there are:
  • Android Junit Report - an instrumentation test runner that provides XML reports for integrating with other tools.
  • Calculon - a Java framework that is launched on Dalvik VM (Virtual Machine).
  • Roboguide - used for injecting the dependence in Android app.
  • Android Mock - a tool for mocking the interfaces and classing on Dalvik VM.
To perform mobile testing, desktop testing or web site testing efficiently these methods should be adjusted for each company and each project. QATestLab is independent, offshore software testing company located in Kiev, Ukraine. QATestLab performs testing of products on each stage of software development cycle.