Multiple-Entry Testing of Android Applications by Constructing Activity Launching Contexts

被引:27
作者
Yan, Jiwei [1 ,2 ]
Liu, Hao [3 ]
Pan, Linjie [2 ,4 ]
Yan, Jun [2 ,4 ]
Zhang, Jian [2 ,4 ]
Liang, Bin [5 ]
机构
[1] Chinese Acad Sci, Inst Software, Tech Ctr Softw Engn, Beijing, Peoples R China
[2] Univ Chinese Acad Sci, Beijing, Peoples R China
[3] Beijing Univ Tech, Dept Informat, Beijing, Peoples R China
[4] Chinese Acad Sci, Inst Software, State Key Lab Comp Sci, Beijing, Peoples R China
[5] Renmin Univ China, Sch Informat, Beijing, Peoples R China
来源
2020 ACM/IEEE 42ND INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2020) | 2020年
基金
中国国家自然科学基金;
关键词
Android app; Static Analysis; ICC; Multiple-Entry Testing;
D O I
10.1145/3377811.3380347
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Existing 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.
引用
收藏
页码:457 / 468
页数:12
相关论文
共 59 条
[1]   MobiGUITAR Automated Model-Based Testing of Mobile Apps [J].
Amalfitano, Domenico ;
Fasolino, Anna Rita ;
Tramontana, Porfirio ;
Ta, Bryan Dzung ;
Memon, Atif M. .
IEEE SOFTWARE, 2015, 32 (05) :53-59
[2]  
Amalfitano D, 2012, IEEE INT CONF AUTOM, P258, DOI 10.1145/2351676.2351717
[3]   The contribution of nanotechnology for removal of water pollutants [J].
Anandan, Sambandam .
Materials Science Forum, 2012, 712 :1-24
[4]  
[Anonymous], 2019, K9MAIL GITHUB
[5]  
[Anonymous], 2019, JAVA STRING
[6]  
[Anonymous], 2019, BUNDLE ANDROID DEVEL
[7]  
[Anonymous], 2016, P 25 INT S SOFTWARE, DOI DOI 10.1145/2931037.2931054
[8]  
[Anonymous], 2019, ISSUSE ANKIDROID
[9]  
[Anonymous], 2019, ISSUSE PADLAND
[10]  
[Anonymous], 2019, FAX