一句话:提出 PREFEST,通过静态与动态结合分析定位影响测试用例的偏好设置,并仅在必要选项组合下执行测试。
Android 应用中的偏好设置会动态改变应用功能与行为,因此需要充分测试;但测试用例通常未显式指定相关偏好,测试者只能手动设置或盲目尝试不同选项组合。本文提出 PREFEST,一种偏好设置感知的 Android 自动测试方法。给定测试用例集,PREFEST 通过静态与动态结合分析被测应用,定位可能影响这些用例的偏好设置,并仅在必要的选项组合下执行测试。评估表明,与原始测试用例相比,PREFEST 提升 6.8% 代码覆盖率和 12.3% 分支覆盖率,多发现 5 个真实缺陷;与偏好选项两两组合测试相比,测试用例数和测试时间均减少 99%。
Preferences, the setting options provided by Android, are an essential part of Android apps. Preferences allow users to change app features and behaviors dynamically, and therefore, need to be thoroughly tested. Unfortunately, the specific preferences used in test cases are typically not explicitly specified, forcing testers to manually set options or blindly try different option combinations. To effectively test the impacts of different preference options, this paper presents PREFEST, as a preference-wise enhanced automatic testing approach, for Android apps. Given a set of test cases, PREFEST can locate the preferences that may affect the test cases with a static and dynamic combined analysis on the app under test, and execute these test cases only under necessary option combinations. The evaluation shows that PREFEST can improve 6.8% code coverage and 12.3% branch coverage and find five more real bugs compared to testing with the original test cases. The test cost is reduced by 99% for both the number of test cases and the testing time, compared to testing under pairwise combination of options.
DOI 原文 ·
@inproceedings{paperbot5061,
title = {Preference-wise testing for Android applications},
author = {Yifei Lu and Minxue Pan and Juan Zhai and Tian Zhang and Xuandong Li},
booktitle = {FSE},
year = {2019},
doi = {10.1145/3338906.3338980}
}