TY - JOUR
T1 - Preference-Wise Testing of Android Apps via Test Amplification
AU - Pan, Minxue
AU - Lu, Yifei
AU - Pei, Yu
AU - Zhang, Tian
AU - Li, Xuandong
N1 - Funding Information:
This research is supported by the Leading-edge Technology Program of Jiangsu Natural Science Foundation (No. BK20202001) and the National Natural Science Foundation of China (Nos. 61972193 and 62032010). This work is also supported in part by the Hong Kong RGC General Research Fund (GRF) PolyU 152002/18E.
Funding Information:
This research is supported by the Leading-edge Technology Program of Jiangsu Natural Science Foundation (No. BK20202001) and the National Natural Science Foundation of China (Nos. 61972193 and 62032010). This work is also supported in part by the Hong Kong RGC General Research Fund (GRF) PolyU 152002/18E
Publisher Copyright:
© 2023 Association for Computing Machinery.
PY - 2023/2/13
Y1 - 2023/2/13
N2 - 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 their impacts need to be considered when testing the apps. Unfortunately, few test cases explicitly specify the assignments of valid values to the preferences, or configurations, under which they should be executed, and few existing mobile testing tools take the impact of preferences into account or provide help to testers in identifying and setting up the configurations for running the tests. This article presents the Prefest approach to effective testing of Android apps with preferences. Given an Android app and a set of test cases for the app, Prefest amplifies the test cases with a small number of configurations to exercise more behaviors and detect more bugs that are related to preferences. In an experimental evaluation conducted on real-world Android apps, amplified test cases produced by Prefest from automatically generated test cases covered significantly more code of the apps and detected seven real bugs, and the tool’s test amplification time was at the same order of magnitude as the running time of the input test cases. Prefest’s effectiveness and efficiency in amplifying programmer-written test cases was comparable with that in amplifying automatically generated test cases.
AB - 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 their impacts need to be considered when testing the apps. Unfortunately, few test cases explicitly specify the assignments of valid values to the preferences, or configurations, under which they should be executed, and few existing mobile testing tools take the impact of preferences into account or provide help to testers in identifying and setting up the configurations for running the tests. This article presents the Prefest approach to effective testing of Android apps with preferences. Given an Android app and a set of test cases for the app, Prefest amplifies the test cases with a small number of configurations to exercise more behaviors and detect more bugs that are related to preferences. In an experimental evaluation conducted on real-world Android apps, amplified test cases produced by Prefest from automatically generated test cases covered significantly more code of the apps and detected seven real bugs, and the tool’s test amplification time was at the same order of magnitude as the running time of the input test cases. Prefest’s effectiveness and efficiency in amplifying programmer-written test cases was comparable with that in amplifying automatically generated test cases.
KW - Android apps
KW - Android testing
KW - preference-wise testing
UR - http://www.scopus.com/inward/record.url?scp=85149426449&partnerID=8YFLogxK
U2 - 10.1145/3511804
DO - 10.1145/3511804
M3 - Journal article
SN - 1049-331X
VL - 32
SP - 1
EP - 37
JO - ACM Transactions on Software Engineering and Methodology
JF - ACM Transactions on Software Engineering and Methodology
IS - 1
M1 - 3511804
ER -