Sunday, March 16, 2014

Setting up Robotium Remote Control

Robotium Remote Control includes the following components


  • Robotium Test Runner
  • SAFS TCP Messenger
  • SoloRemoteControl
Rebotium Test Runner :
The TestRunner is a general-purpose InstrumentationTestRunner created specifically for Robotium/Solo Remote Control.  Because the actual AUT-specific test code is on the remote Controller and NOT in the TestRunner, the TestRunner may easily be resigned and repackaged for testing any number of AUTs without modifying its internal code.  The TestRunner receives its remote command and control data and reports its success, failure, and results data through the Messenger service.the TestRunner may easily be resigned and repackaged for testing any number of AUTs without modifying its internal code.  The TestRunner receives its remote command and control data and reports its success, failure, and results data through the Messenger service.

SAFS TCP messenger:
TCP messenger is a general-purpose SAFS TCP Communication service on Android.  It allows us to provide remote control capabilities over TCP even for AUTs and TestRunners that DO NOT have the required INTERNET permissions necessary for TCP communications.  This service is required (and provided) for Robotium Remote Control even for AUTs that might already have INTERNET permissions.

Prerequisites for Setting up Robotium RC:

  • Android SDK
  • APachec Ant
  • Remote Robotium Libraries

Thursday, October 24, 2013

Android Automation using Robotium Remote Control

I have been Evaluation the following open Source automation tools and the ones I'm looking to have
is to support the following.
  1. Independent of Application(AUT) Source Code and the automation should be supported using APK
  2. Tool to support integration with  OOPS so that the framework can be built robust.
  3. Achieve execution of the tests from Client machine rather than running them on device.
  4. Independent of Instrumentation frameworks like Junit.
  5. Integrate the tool with other opensource API like log4j and other Java supported API
  6. Object identification support based on object properties like 'name' rather than screen coordinated.
  7. Build and continuous integration support

Initially started the analysis with Robotium and Monkey talk and below are my observations

Monkey talk : is an open source android Functional Automation tool that support both on record and scripting. Since the scripting t javascript based i was a bit biased in selecting this tool to integrated with our existing automation framework.

Parking Monkey Talk aside, I started evaluating thest Robotium. Below are my observations
  1. Cool Java API and seems to be best fit into my framework.
  2. Limitations of Robotium is that it is tightly coupled to Junit Instrumentation framework.
  3. Tests are compiled as apk files and execution happens over the device. hence it is difficult to control or Debug the tests.
  4. Cannot track the custom log message other than logcat messages.
I came across another version of Robotium called Robotium remote Control.
Observations:

  1. Execution can be controlled from a client machine which is the major advatage over Robotium Solo
  2. Independent of Junit Instrumentation Classes
  3. Support integration with log4j,Droid@Screen and other opensource Java API