AI Chat Paper
Note: Please note that the following content is generated by AMiner AI. SciOpen does not take any responsibility related to this content.
{{lang === 'zh_CN' ? '文章概述' : 'Summary'}}
{{lang === 'en_US' ? '中' : 'Eng'}}
Chat more with AI
PDF (1.7 MB)
Collect
Submit Manuscript AI Chat Paper
Show Outline
Outline
Show full outline
Hide outline
Outline
Show full outline
Hide outline
Open Access

CamDroid: Context-Aware Model-Based Automated GUI Testing for Android Apps

School of Software, Tsinghua University, Beijing 100084, China
Hangzhou Uusense Technology Inc., Hangzhou 310012, China
Show Author Information

Abstract

Recent years have witnessed the widespread adoption of mobile applications (apps for short). For quality-of-service and commercial competitiveness, sufficient Graphical User Interface (GUI) testing is required to verify the robustness of the apps. Given that testing with manual efforts is time-consuming and error-prone, automated GUI testing has been widely studied. However, existing approaches mostly focus on GUI exploration while lacking attention to complex interactions with apps, especially generating appropriate text inputs like real users. In this paper, we introduce CamDroid, a lightweight context-aware automated GUI testing tool, which can efficiently explore app activities through (1) a model-based UI-guided testing strategy informed by the context of previous event-activity transitions and (2) a data-driven text input generation approach regarding the GUI context. We evaluate CamDroid on 20 widely-used apps. The results show that CamDroid outperforms non-trivial baselines in activity coverage, crash detection, and test efficiency.

References

[1]
[2]
L.i Gong, Z. Li, H. Wang, H. Lin, X. Ma, and Y. Liu, Overlay-based android malware detection at market scales: Systematically adapting to the new technological landscape, IEEE Transactions on Mobile Computing, vol. 21, no.12, pp. 4488–4501, 2021.
[3]
L. Gong, H. Lin, Z. Li, F. Qian, Y. Li, X. Ma, and Y. Liu, Systematically landing machine learning onto market-scale mobile malware detection, IEEE Transactions on Parallel and Distributed Systems, vol. 32, no. 7, pp. 1615–1628, 2020.
[4]
L. Gong, Z. Li, F. Qian, Z. Zhang, Q. Chen, Z. Qian, H. Lin, and Y. Liu, Experiences of landing machine learning onto market-scale mobile malware detection, in Proc. 15th European Conference on Computer Systems, Bordeaux, France, 2020, pp. 1–14.
[5]
Y. Yan, Z. Li, Q. Chen, C. Wilson, T. Xu, E. Zhai, Y. Li, and Y. Liu, Understanding and detecting overlay-based android malware at market scales, in Proc. 17th Annual International Conference on Mobile Systems, Applications, and Services, Seoul, Republic of Korea, 2019, pp. 168–179.
[6]
T. Gu, C. Sun, X. Ma, C. Cao, C. Xu, Y. Yao, Q. Zhang, J. Lu, and Z. Su, Practical GUI testing of android applications via model abstraction and refinement, in Proc. 41st International Conference on Software Engineering, Montreal, Canada, 2019, pp. 269–280.
[7]
Z. Lv, C. Peng, Z. Zhang, T. Su, K. Liu, and P. Yang, Fastbot2: Reusable automated model-based GUI testing for android enhanced by reinforcement learning, in Proc. 37th International Conference on Automated Software Engineering, Rochester, MI, USA, 2022, pp. 1–5.
[8]
Y. Li, Z. Yang, Y. Guo, and X. Chen, Humanoid: A deep learning-based approach to automated black-box android app testing, in Proc. 34th International Conference on Automated Software Engineering, San Diego, CA, USA, 2019, pp. 1070–1073.
[9]
H. Lin, J. Qiu, H. Wang, Z. Li, L.i Gong, D. Gao, Y. Liu, F. Qian, Z. Zhang, P. Yang, et al., Virtual device farms for mobile app testing at scale, in Proc. 29th ACM International Conference on Mobile Computing and Networking, Madrid, Spain, 2023, pp. 1–17.
[12]
[19]
[21]
T. Zhang, V. Kishore, F. Wu, K. Weinberger, and Y. Artzi, BERTScore: Evaluating text generation with bert, arXiv preprint arXiv: 1904.09675, 2019.
[22]
Google, Ui/application exerciser monkey, https://developer.android.com/studio/test/monkey.html, 2018.
[23]
R. Mahmood, N. Mirzaei, and S. Malek, Evodroid: Segmented evolutionary testing of android apps, in Proc. 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, Hong Kong, China, 2014, pp. 599–609.
[24]
K. Mao, M. Harman, and Y. Jia, Sapienz: Multi-objective automated testing for android applications, in Proc. 25th International Symposium on Software Testing and Analysis, Saarbrucken, Germany, 2016, pp. 94–105.
[25]
T. Su, G. Meng, Y. Chen, K. Wu, W. Yang, Y. Yao, G. Pu, Y. Liu, and Z. Su, Guided, stochastic model-based GUI testing of android apps, in Proc. 11th Joint Meeting on Foundations of Software Engineering, Paderborn, Germany, 2017, pp. 245–256.
[26]
Y. Li, Z. Yang, Y. Guo, and X. Chen, Droidbot: A lightweight UI-guided test input generator for android, in Proc. 39th International Conference on Software Engineering Companion, Buenos, Aires, 2017, pp. 23–26.
[27]
Z. Liu, C. Chen, J. Wang, X. Che, Y. Huang, J. Hu, and Q. Wang, Fill in the blank: Context-aware automated text input generation for mobile GUI testing, in Proc. 45th International Conference on Software Engineering, Melbourne, Australia, 2023, pp. 1355–1367.
[28]
K. De Asis, J Hernandez-Garcia, G Holland, and R. Sutton, Multi-step reinforcement learning: A unifying algorithm, in Proc. 32nd AAAI Conference on Artificial Intelligence, New Orleans, LA, USA, 2018, pp. 2902–2909.
[29]
Y. Gao and F. Toni, Potential based reward shaping for hierarchical reinforcement learning, in Proc. 24th International Joint Conference on Artificial Intelligence, Buenos Aires, Argentina, 2015, pp 3504–3510.
[30]
B. Deka, Z. Huang, C. Franzen, J. Hibschman, D. Afergan, Y. Li, J. Nichols, and R. Kumar, Rico: A mobile app dataset for building data-driven design applications, in Proc. 30th Annual ACM Symposium on User Interface Software and Technology, Quebec City, Canada, 2017, pp. 845–854.
[31]
[32]
J. Devlin, M. Chang, K. Lee, and K. Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding, arXiv preprint arXiv: 1810.04805, 2018.
[33]
T. Amemiya, Non-linear regression models, Handbook of Econometrics, vol. 1, pp. 333–389, 1983.
[34]
L. M. Lix, J. C. Keselman, and H. J. Keselman, Consequences of assumption violations revisited: A quantitative review of alternatives to the one-way analysis of variance f test, Review of Educational Research, vol. 66, no. 4, pp. 579–619, 1996.
[35]
J. A. Morgan and J. F. Tatar, Calculation of the residual sum of squares for all possible regressions, Technometrics, vol. 14, no. 2, pp. 317–325, 1972.
[36]
E. B. Andersen, A goodness of fit test for the rasch model. Psychometrika, vol. 38, pp. 123–140, 1973.
[37]
I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio, Generative adversarial nets, in Proc. 28th Conference on Neural Information Processing Systems, Montreal, Canada, 2014, pp. 2672–2680.
[38]
Y. Li, H. Lin, Z. Li, Y. Liu, F. Qian, L. Gong, X. Xin, and T. Xu, A nationwide study on cellular reliability: Measurement, analysis, and enhancements, in Proc. of 2021 ACM International Conference on Applications, Technologies, Architectures, and Protocols for Computer Communication, Virtual Event, 2021, pp. 597–609.
[39]
S. Choudhary, A. Gorla, and A. Orso, Automated test input generation for android: Are we there yet? in Proc. 30th International Conference on Automated Software Engineering, Lincoln, NE, USA, 2015, pp. 429–440.
[41]
W. Choi, G. Necula, and K. Sen, Guided GUI testing of android apps with minimal restart and approximate learning, ACM Sigplan Notices, vol. 48, no. 10, pp. 623–640, 2013.
[42]
C. Degott, N. B. Jr, and A. Zeller, Learning user interface element interactions, in Proc. 28th ACM SIGSOFT International Symposium on Software Testing and Analysis, Beijing, China, 2019, pp. 296–306.
[43]
S. Hao, B. Liu, S. Nath, W. Halfond, and R. Govindan, Puma: Programmable ui-automation for large-scale dynamic analysis of mobile apps, in Proc. 12th Annual International Conference on Mobile Aystems, Applications, and Services, Bretton Woods, NH, USA, 2014, pp. 204–217.
[44]
P. Liu, X. Zhang, M. Pistoia, Y. Zheng, M. Marques, and L. Zeng, Automatic text input generation for mobile testing, in Proc. 39th International Conference on Software Engineering, Buenos, Aires, 2017, pp. 643–653.
[45]
Y. He, L. Zhang, Z. Yang, Y. Cao, K. Lian, S. Li, W. Yang, Z. Zhang, M. Yang, Y. Zhang, et al., Textexerciser: Feedback-driven text input exercising for android applications, in Proc. 41st IEEE Symposium on Security and Privacy, San Francisco, CA, USA, 2020, pp. 1071–1087.
Tsinghua Science and Technology
Pages 55-67
Cite this article:
Wang H, Li Y, Yang J, et al. CamDroid: Context-Aware Model-Based Automated GUI Testing for Android Apps. Tsinghua Science and Technology, 2025, 30(1): 55-67. https://doi.org/10.26599/TST.2024.9010038

280

Views

52

Downloads

0

Crossref

0

Web of Science

0

Scopus

0

CSCD

Altmetrics

Received: 25 October 2023
Revised: 09 February 2024
Accepted: 15 February 2024
Published: 11 September 2024
© The Author(s) 2025.

The articles published in this open access journal are distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/).

Return