A Streaming Algorithm for the Convex Hull

Mutation operators for
testing Android apps
By: Lin Deng ∗, JeffOffutt , Paul Ammann , Nariman Mirzaei
CCCG 2016.
Published on: Information and Software Technology
Presented By: Khashayar Etemadi
1
Perspective
• To have more effective test-suites
• A way to evaluate test generating methods
• A tool is built
• In PRELIMINARY-STAGE (Hoorey!) yet
2
Introduction
• Growing market
• 83.1% sales of smartphones in 3rd quarter of 2014
3
Introduction (cont.)
• No fault model
•
muJava based on fault model was base on fault model by
Alexander
• Start by analyzing the unique technical features of
Android apps
• Proof-of-concept mutation analysis tool (traditional and
new)
•
•
•
Better tests
Evaluate test techniques
Decrease number of tests
4
Introduction (cont.)
• It defines novel mutation operators specific to Android
apps
• It evaluates these mutation operators on eight Android
apps
• It identifies future research areas for mutation analysis of
An- droid apps
Based on work published at mutation 2015
5
Background (Android Structure)
• Development Environment (ADF)
•
Api for logic, GUI, access data
• O.S. is based on linux
• Dalvik Virtual Machine (till 4.4) and Android Runtime after
6
Background(Android Structure cont.)
7
Background(Android Structure cont.)
8
Background(Mutation Testing)
• Modifies a software artifact to create new versions
• Mutation operators are developed for many languages
•
•
•
•
•
muJava for Java
CREAM for C#
Proteum for C
Mothra for Fortran
MutPy for Python
9
Method
• No fault-model!
• No special method, just
trusting on their knowledge
20
December
2015
10
(A fault model could help a lot)
11
Operators (By Intent)
• Intent payload replacement ( IPR )
• Intent target replacement ( ITR )
12
Activity Lifecycle
• Lifecycle method deletion ( MDL )
•
Like IOD in muJava (deletion of overriding method)
•
Just for activity lifecycle method
13
Event Handlers
• Android is event-driven
• OnClick event replacement ( ECR )
• OnTouch event replacement ( ETR )
• Replace with events in current class. What about other?
• What about other events? (Long press)
14
XML operators
• The manifest file presents essential information about
your app to the Android system, information the system
must have before it can run any of the app's code
• Button widget deletion ( BWD )
• EditText widget deletion ( TWD )
• Button widget switch ( BWS ) => Testing widgets’ location
• What about other widgets?
15
Common Faults
• Fail on null ( FON )
•
•
Before reference to objects
Fail on empty before access to objects
• Orientation lock ( ORL )
16
Running tests on mutants
1. Select operators
2. Changing java code
3. Changing XML files
4. Generating APK and discarding stillborn
5. Using original APK to evaluate mutant
6. Robotium as a test framework
7. Score is computed
17
Empirical Evaluation
18
Results
19
Results (cont.)
20
Results (cont.)
21
Thanks
22