robotium tran dai t1309l. introduce what is robotium ? how can setup ? why we need robotium ? when
TRANSCRIPT
Robotium
Tran DaiT1309L
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
http://code.google.com/p/robotium/downloads/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..
AVD or Device
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.