本文已被:浏览 655次 下载 1718次
Received:March 25, 2022 Revised:April 22, 2022
Received:March 25, 2022 Revised:April 22, 2022
中文摘要: 随着Android应用软件数量的急速增加, Android应用质量的重要性越来越受到人们的重视. 测试是高质量软件的重要保证, 而测试用例生成技术是自动化测试的关键. 数据显示, 在Google Play中有将近88%的Android应用程序使用了反射. 然而, 现有的Android测试用例自动生成方法通常没有考虑反射技术的使用, 无法检测出反射隐藏的恶意行为. 为了进一步提高软件质量, 本文提出一种新的Android测试用例生成方法, 结合反射特征构造Android应用程序多粒度模型, 同时对反射关系进行分析, 生成能到达反射的调用路径, 并利用自适应遗传算法生成覆盖反射路径的测试用例, 对含反射特征的Android应用进行测试. 为验证本文方法, 分别从Android应用多粒度模型有效性及测试方法效率两方面对本文方法有效性进行评估. 实验结果表明, 本文提出的基于反射特征的Android测试用例自动生成方法对于反射的检测效果更好并且效率更高.
中文关键词: 反射机制 Android应用 Android多粒度模型 自适应遗传算法 测试用例生成
Abstract:With the rapid increase in the number of Android applications, more importance is attached to the quality of Android applications. Testing is an important guarantee for high-quality software, and test case generation technology is the key to automated testing. Data shows that nearly 88% of Android applications in Google Play use reflection. The existing automatic test case generation methods for Android, however, usually do not consider the use of reflection and cannot detect the malicious behavior hidden by reflection. To further improve software quality, this study proposes a new test case generation method for Android, which uses reflection features to construct a multi-grain model of Android applications. Meanwhile, it analyzes reflection relationships to generate call paths that can reach reflection and employs the adaptive genetic algorithm to generate test cases that cover reflection paths to test Android applications with reflection features. For verification, the effectiveness of this method is evaluated in terms of the effectiveness of the multi-grain model of Android applications and the efficiency of the test method. The experimental results reveal that the automatic test case generation method for Android, which is based on reflection features, is more effective and efficient in detecting reflection.
keywords: reflection mechanism Android application Android multi-grain model adaptive genetic algorithm test case generation
文章编号: 中图分类号: 文献标志码:
基金项目:国家自然科学基金(62077003)
引用文本:
闫怡梦,赵瑞莲,王微微,尚颖.基于反射特征的Android测试用例自动生成.计算机系统应用,2022,31(12):350-358
YAN Yi-Meng,ZHAO Rui-Lian,WANG Wei-Wei,SHANG Ying.Automatic Generation of Android Test Cases Based on Reflection Features.COMPUTER SYSTEMS APPLICATIONS,2022,31(12):350-358
闫怡梦,赵瑞莲,王微微,尚颖.基于反射特征的Android测试用例自动生成.计算机系统应用,2022,31(12):350-358
YAN Yi-Meng,ZHAO Rui-Lian,WANG Wei-Wei,SHANG Ying.Automatic Generation of Android Test Cases Based on Reflection Features.COMPUTER SYSTEMS APPLICATIONS,2022,31(12):350-358