Computer Science ›› 2025, Vol. 52 ›› Issue (12): 40-47.doi: 10.11896/jsjkx.241100054

• Computer Software & Architecture • Previous Articles     Next Articles

Distributed Automated Testing for Android Applications Based on Reinforcement Learning

SONG Rirong, CHEN Qinwen, CHEN Xing   

  1. College of Computer and Data Science, Fuzhou University, Fuzhou 350116, China
    Engineering Research Center of Big Data Intelligence, Ministry of Education, Fuzhou 350116, China
    Fujian Key Laboratory of Network Computing and Intelligent Information Processing(Fuzhou University), Fuzhou 350116, China
  • Received:2024-11-08 Revised:2025-01-23 Online:2025-12-15 Published:2025-12-09
  • About author:SONG Rirong,born in 2000,postgraduate.His main research interest is Android automated testing.
    CHEN Xing,born in 1985,Ph.D,professor,Ph.D supervisor,is a member of CCF(No.35725M).His main research interests include software systems and engineering approaches for cloud and mobility.His current projects cover the topics from self-adaptive software,computation offloading,model driven approach and so on.He has published over 100 journal and conference articles,including IEEE Transactions on Parallel and Distributed Systems,IEEE Transactions on Mobile Computing,IEEE Transactions on Cloud Computing,IEEE Transactions on Industrial Informatics,etc.
  • Supported by:
    This work was supported by the National Natural Science Foundation of China(62072108),Special Funds for Promoting High-quality Development of Marine and Fishery Industries in Fujian Province (FJHYF-ZH-2023-02) and Fujian Key Technological Innovation and Industrialization Projects (2024XQ004).

Abstract: Android applications have become deeply integrated into various aspects of people’s daily lives.However,ensuring the correctness of these applications remains a highly challenging task.Traditional testing methods primarily rely on manual operations,while automated testing technologies,despite advancements,still require improvements.The continuous iteration of Android applications to enhance performance and meet functional requirements has led to increased application complexity and an explosive growth in state combinations.Testing the core aspects of Android applications involves exploring deep-seated failures under complex user interactions,but the search space for these failures is vast,necessitating substantial time investment for thorough testing.In recent years,researchers have begun employing reinforcement learning to test Android applications by adjusting exploration strategies based on rewards obtained during the interaction between agents and the Android applications.However,existing work has been limited to testing with a single device,significantly constraining testing efficiency.To address these challenges,this paper proposes a distributed automated testing framework for Android applications based on reinforcement learning,named DistributedAndroidExplore(DAE).DAE utilizes multiple agents to concurrently conduct reinforcement learning-based testing on applications and periodically iterates to aggregate the cumulative learning experiences of each agent,thereby enhancing testing efficiency.DAE is evaluated on 10 real-world Android applications.The results indicate that,in most cases,DAE surpasses the compared benchmark algorithms in terms of fault detection rate and code coverage.Furthermore,DAE demonstrates notably higher testing efficiency,with performance improvements ranging from 16.5% to 34.3%.

Key words: Distributed system, Android applications, Reinforcement learning, Q-learning, Automated testing

CLC Number: 

  • TP311
[1]TANG W H,TANG S H,LIAO C L.China’s Mobile Internet in the 5G Era——Release of the “Development Report of China’s Mobile Internet(2020)”[J].China Newspaper Industry,2020(17):32-35.
[2]ZELENCHUK D,ZELENCHUK D.Supervised monkey testswith espresso and UI automator[M]//Android Espresso Revealed:Writing Automated UI Tests.Berkeley,CA:Apress,2019:255-269.
[3]PAYDAR S.An empirical study on the effectiveness of monkey testing for android applications[J].Iranian Journal of Science and Technology,Transactions of Electrical Engineering,2020,44(2):1013-1029.
[4]KALYSCH A,DEUTEL M,MÜLLER T.Template-based Android inter process communication fuzzing[C]//Proceedings of the 15th International Conference on Availability,Reliability and Security.2020:1-6.
[5]SU T,MENG G,CHEN Y,et al.Guided,stochastic model-based GUI testing of Android apps[C]//Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering.2017:245-256.
[6]AMALFITANO D,FASOLINO A R,TRAMONTANA P,et al.Using GUI ripping for automated testing of Android applications[C]//Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.2012:258-261.
[7]AMALFITANO D,FASOLINO A R,TRAMONTANA P,et al.MobiGUITAR:Automated model-based testing of mobile apps[J].IEEE Software,2014,32(5):53-59.
[8]NGUYEN B N,ROBBINS B,BANERJEE I,et al.GUITAR:an innovative tool for automated testing of GUI-driven software[J].Automated Software Engineering,2014,21:65-105.
[9]MAO K,HARMAN M,JIA Y.Sapienz:Multi-objective automated testing for android applications[C]//Proceedings of the 25th International Symposium on Software Testing and Analysis.2016:94-105.
[10]MAHMOOD R,MIRZAEI N,MALEK S.Evodroid:Segmented evolutionary testing of android apps[C]//Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering.2014:599-609.
[11]GAO X,TAN S H,DONG Z,et al.Android testing via synthetic symbolic execution[C]//Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering.2018:419-429.
[12]PAN M,HUANG A,WANG G,et al.Reinforcement learning based curiosity-driven testing of Android applications[C]//Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis.2020:153-164.
[13]ROMDHANA A,MERLO A,CECCATO M,et al.Deep rein-forcement learning for black-box testing of android apps[J].ACM Transactions on Software Engineering and Methodology,2022,31(4):1-29.
[14]GAO Y,TAO C,GUO H,et al.A Deep Reinforcement Learning-Based Approach for Android GUI Testing[C]//Asia-Pacific Web(APWeb) and Web-Age Information Management(WAIM) Joint International Conference on Web and Big Data.Cham:Springer,2023:262-276.
[15]LÓPEZ Y P,COLONNA J G,SILVA E D A,et al.Q-funcT:A Reinforcement Learning Approach for Automated Black Box Functionality Testing[C]//2022 IEEE 2nd International Conference on Software Engineering and Artificial Intelligence(SEAI).IEEE,2022:119-123.
[16]COLLINS E,NETO A,VINCENZI A,et al.Deep reinforcement learning based Android application GUI testing[C]//Proceedings of the XXXV Brazilian Symposium on Software Engineering.2021:186-194.
[17]LU P,YANG C Z,YOU Z J.DiLAD:A Distributed Layout Testing Framework for Android Applications[C]//2020 the 3rd International Conference on Computing and Big Data.2020:24-29.
[18]BORGES JR N P,GÓMEZ M,ZELLER A.Guiding app testing with mined interaction models[C]//Proceedings of the 5th International Conference on Mobile Software Engineering and Systems.2018:133-143.
[19]KOROGLU Y,SEN A,MUSLU O,et al.QBE:QLearning-based exploration of android applications[C]//2018 IEEE 11thInternational Conference on Software Testing,Verification and Validation(ICST).IEEE,2018:105-115.
[20]WANG Y,CHEN Y R,CHEN X,et al.Automating Release of Android APIs via Computational Reflection [J].Computer Science,2022,49(12):136-145.
[21]ESKONEN J,KAHLES J,REIJONEN J.Automating gui testing with image-based deep reinforcement learning[C]//2020 IEEE International Conference on Autonomic Computing and Self-Organizing Systems(ACSOS).IEEE,2020:160-167.
[22]Android Uiautomator2 Python Wrapper[EB/OL].https://github.com/openatx/uiautomator2.
[23]Eclemma.JaCoCo Java Code Coverage Library[EB/OL](2020).https://www.eclemma.org/jacoco/index.html.
[1] ZHU Shihao, PENG Kexing, MA Tinghuai. Graph Attention-based Grouped Multi-agent Reinforcement Learning Method [J]. Computer Science, 2025, 52(9): 330-336.
[2] CHEN Jintao, LIN Bing, LIN Song, CHEN Jing, CHEN Xing. Dynamic Pricing and Energy Scheduling Strategy for Photovoltaic Storage Charging Stations Based on Multi-agent Deep Reinforcement Learning [J]. Computer Science, 2025, 52(9): 337-345.
[3] ZHANG Yongliang, LI Ziwen, XU Jiahao, JIANG Yuchen, CUI Ying. Congestion-aware and Cached Communication for Multi-agent Pathfinding [J]. Computer Science, 2025, 52(8): 317-325.
[4] HUO Dan, YU Fuping, SHEN Di, HAN Xueyan. Research on Multi-machine Conflict Resolution Based on Deep Reinforcement Learning [J]. Computer Science, 2025, 52(7): 271-278.
[5] PIAO Mingjie, ZHANG Dongdong, LU Hu, LI Rupeng, GE Xiaoli. Study on Multi-agent Supply Chain Inventory Management Method Based on Improved Transformer [J]. Computer Science, 2025, 52(6A): 240500054-10.
[6] XU Dan, WANG Jiangtao. Design of Autonomous Decision for Trajectory Optimization of Intelligent Morphing Aircraft [J]. Computer Science, 2025, 52(6A): 240600068-7.
[7] WU Zongming, CAO Jijun, TANG Qiang. Online Parallel SDN Routing Optimization Algorithm Based on Deep Reinforcement Learning [J]. Computer Science, 2025, 52(6A): 240900018-9.
[8] ZHAO Chanchan, YANG Xingchen, SHI Bao, LYU Fei, LIU Libin. Optimization Strategy of Task Offloading Based on Meta Reinforcement Learning [J]. Computer Science, 2025, 52(6A): 240800050-8.
[9] WANG Chenyuan, ZHANG Yanmei, YUAN Guan. Class Integration Test Order Generation Approach Fused with Deep Reinforcement Learning andGraph Convolutional Neural Network [J]. Computer Science, 2025, 52(6): 58-65.
[10] ZHAO Xuejian, YE Hao, LI Hao, SUN Zhixin. Multi-AGV Path Planning Algorithm Based on Improved DDPG [J]. Computer Science, 2025, 52(6): 306-315.
[11] LI Yuanbo, HU Hongchao, YANG Xiaohan, GUO Wei, LIU Wenyan. Intrusion Tolerance Scheduling Algorithm for Microservice Workflow Based on Deep Reinforcement Learning [J]. Computer Science, 2025, 52(5): 375-383.
[12] HAN Lin, WANG Yifan, LI Jianan, GAO Wei. Automatic Scheduling Search Optimization Method Based on TVM [J]. Computer Science, 2025, 52(3): 268-276.
[13] ZHENG Longhai, XIAO Bohuai, YAO Zewei, CHEN Xing, MO Yuchang. Graph Reinforcement Learning Based Multi-edge Cooperative Load Balancing Method [J]. Computer Science, 2025, 52(3): 338-348.
[14] DU Likuan, LIU Chen, WANG Junlu, SONG Baoyan. Self-learning Star Chain Space Adaptive Allocation Method [J]. Computer Science, 2025, 52(3): 359-365.
[15] HUO Xingpeng, SHA Letian, LIU Jianwen, WU Shang, SU Ziyue. Windows Domain Penetration Testing Attack Path Generation Based on Deep Reinforcement Learning [J]. Computer Science, 2025, 52(3): 400-406.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!