How to Automate Mobile Testing (Android Platform) using Robotium

Robotium is a tool used for mobile application testing (automation testing) for android. It involves a single class Solo which works in conjunction with Android testing api.

Robotium testing project contains testing classes corresponding to the Activity which we have to test. These test cases extend Android Testing api's Instrumentationclass, ActivityInstrumentationTestCase2 which provides a hook into the life cycle of target application and launches it. This provides the context of current activity of target app in testing app which we can manipulate.

Android Testing Framework

JUnit
Java api is used to run test for plain java code. Android testing classes extend JUnit api and provide android specific code like setup, tear-down methods.

Intrumentation
A group of control methods or "hooks" in the Android system is called Android instrumentation. These hooks are used to control an Android component of its lifecycle and also control the way Android loads applications.

Android specific Testing classes
Android Testing framework provides android component-specific test case classes like Activity Testing,Content Provider Testing,Service Testing.

Category: