robotium tran dai t1309l. introduce what is robotium ? how can setup ? why we need robotium ? when

8
Robotium Tran Dai T1309L

Upload: alexander-wiggins

Post on 23-Dec-2015

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Robotium Tran Dai T1309L. Introduce What is Robotium ? How can setup ? Why we need Robotium ? When

Robotium

Tran DaiT1309L

Page 2: Robotium Tran Dai T1309L. Introduce What is Robotium ? How can setup ? Why we need Robotium ? When

Introduce

• What is Robotium ?• How can setup ?• Why we need Robotium ?• When

Page 3: 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

Page 4: Robotium Tran Dai T1309L. Introduce What is Robotium ? How can setup ? Why we need Robotium ? When

Setup

• Newest version is 5.1• Requirement – JDK ( Java)– Eclipse– Android SDK– Download Robitium

http://code.google.com/p/robotium/downloads/list

Page 5: Robotium Tran Dai T1309L. Introduce What is Robotium ? How can setup ? Why we need Robotium ? When

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

Page 6: Robotium Tran Dai T1309L. Introduce What is Robotium ? How can setup ? Why we need Robotium ? When

Process

Application package

Instrumenation TestRunner Test Package

Test case classes, instrumenation, Junit,

mock objects,etc..

AVD or Device

Page 7: Robotium Tran Dai T1309L. Introduce What is Robotium ? How can setup ? Why we need Robotium ? When

DEMO

Page 8: Robotium Tran Dai T1309L. Introduce What is Robotium ? How can setup ? Why we need Robotium ? When

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.