Robotium Tran Dai T1309L
Introduce What is Robotium ? How can setup ? Why we need Robotium ? When
What is robotium ? Android test automation framework Support for native and hybrid apps. Good solution for black box testing on Android. Can be execute test on AVD and Real device
Setup Newest version is 5.1 Requirement – JDK ( Java) – Eclipse – Android SDK – Download Robitium list
Background – Junit test on Android Android testing based on Junit test Test case classes can extend by the time. Execute test using an SDK provided Instrumentation TestRunner
Process Application package Instrumenation TestRunner Test Package Test case classes, instrumenation, Junit, mock objects,etc..
DEMO
Why we need robotium ? Requires deep knowledge of widgets – Widget IDs – Widget Properties – What has focus – Order of widgets – Etc. Often requires deep knowledge of Android internals – Especially around menus, dialogs, etc. Makes for brittle unit tests – As the UI changes, the test often must change dramatically. Poor instrumentation – Instrumentation is a feature in which specific monitoring of the interactions between an application and the system are made possible. – Use of runOnUIThread to execute UI work that isn’t covered by TouchUtils or TestCase class.