Title
Multiple-entry testing of Android applications by constructing activity launching contexts
Abstract
ABSTRACTExisting GUI testing approaches of Android apps usually test apps from a single entry. In this way, the marginal activities far away from the default entry are difficult to be covered. The marginal activities may fail to be launched due to requiring a great number of activity transitions or involving complex user operations, leading to uneven coverage on activity components. Besides, since the test space of GUI programs is infinite, it is difficult to test activities under complete launching contexts using single-entry testing approaches. In this paper, we address these issues by constructing activity launching contexts and proposing a multiple-entry testing framework. We perform an inter-procedural, flow-, context- and path-sensitive analysis to build activity launching models and generate complete launching contexts. By activity exposing and static analysis, we could launch activities directly under various contexts without performing long event sequence on GUI. Besides, to achieve an in-depth exploration, we design an adaptive exploration framework which supports the multiple-entry exploration and dynamically assigns weights to entries in each turn. Our approach is implemented in a tool called Fax, with an activity launching strategy Faxla and an exploration strategy Faxex. The experiments on 20 real-world apps show that Faxla can cover 96.4% and successfully launch 60.6% activities, based on which Faxex further achieves a relatively 19.7% improvement on method coverage compared with the most popular tool Monkey. Our tool also behaves well in revealing hidden bugs. Fax can trigger over seven hundred unique crashes, including 180 Errors and 539 Warnings, which is significantly higher than those of other tools. Among the 46 bugs reported to developers on Github, 33 have been fixed up to now.
Year
DOI
Venue
2020
10.1145/3377811.3380347
International Conference on Software Engineering
Keywords
DocType
ISSN
Android app, Static Analysis, ICC, Multiple-Entry Testing
Conference
0270-5257
ISBN
Citations 
PageRank 
978-1-7281-6519-6
3
0.38
References 
Authors
26
6
Name
Order
Citations
PageRank
Jiwei Yan1104.22
Hao Liu233.08
Linjie Pan351.75
Jun Yan4146.32
Jian Zhang53212.20
Bin Liang6386.75