Computer Science ›› 2023, Vol. 50 ›› Issue (11A): 221200145-7.doi: 10.11896/jsjkx.221200145

• Computer Software & Architecture • Previous Articles     Next Articles

Automated Testing Method of Android Applications Based on SA-UCB Algorithm

WANG Xi, ZHAO Chunlei, BU Zhiliang, YANG Yi   

  1. School of Computer Science and Engineering,Tianjin University of Technology,Tianjin 300384,China
    Key Laboratory of Computer Vision and System of Ministry of Education,Tianjin University of Technology,Tianjin 300384,China
    Tianjin Key Laboratory of Intelligent Computing and New Software Technology,Tianjin University of Technology,Tianjin 300384,China
  • Published:2023-11-09
  • About author:WANG Xi,born in 1998,postgraduate.Her main research interests include Android automated testing and so on.
    ZHAO Chunlei,born in 1979,Ph.D,associate professor,is a member of China Computer Federation.Her main research interests include cybersecurity and so on.
  • Supported by:
    Key Special Project of “Science and Technology Helps Economy 2020” of the Ministry of Science and Technology(SQ2020YFF0413781).

Abstract: Aiming at the problem that the traditional reinforcement learning algorithm needs to learn the code of conduct,which leads to low testing efficiency,a model-based automated testing method for Android applications,SA-UCB,is proposed.The Sarsa algorithm is used to guide the test process,and the Q table is used as the reference for action strategy selection.And for the randomness of ε-greedy integrated by the classical Sarsa algorithm is too strong,the upper confidence bound algorithm(UCB algorithm) is introduced to balance the “exploration-exploitation dilemma”,which makes action decisions more decentralized.And it is applied to the Android automated testing process,the testing efficiency is improved.The SA-UCB method is compared with other five test methods in terms of test coverage,test efficiency and fault detection.The results show that SA-UCB strategy has certain advantages in test coverage and test efficiency under the same experimental conditions.

Key words: Android, Automated testing, Reinforcement learning, Sarsa, UCB

CLC Number: 

  • TP391
[1]China Internet Network Information Center.The 49th ChinaStatistical Report on Internet Development[R].Beijing:China Internet Network Information Center,2022.
[2]LIU I J,JAIN U,YEH R A,et al.Cooperative exploration formulti-agent deep reinforcement learning[C]//International Conference on Machine Learning.PMLR,2021:6826-6836.
[3]BELHADI A,DJENOURI Y,SRIVASTAVA G,et al.Rein-forcement learning multi-agent system for faults diagnosis of mircoservices in industrial settings[J].Computer Communications,2021,177:213-219.
[4]IBARZ J,TAN J,FINN C,et al.How to train your robot with deep reinforcement learning:lessons we have learned[J].The International Journal of Robotics Research,2021,40(4/5):698-721.
[5]ZHU K,ZHANG T.Deep reinforcement learning based mobile robot navigation:A review[J].Tsinghua Science and Technology,2021,26(5):674-691.
[6]ZHANG Z,LINIGER A,DAI D,et al.End-to-end urban driving by imitating a reinforcement learning coach[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision.2021:15222-15232.
[7]AMALFITANO D,FASOLINO A R,TRAMONTANA P,et al.Using gui ripping for automated testing of android applications[C]//2012 Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.IEEE,2012:258-261.
[8]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.
[9]YANG W,PRASAD M R,XIE T.A grey-box approach for automated gui-model generation of mobile applications[C]//International Conference on Fundamental Approaches to Software Engineering.Springer,2013:250-265.
[10]BAEK Y M,BAE D H.Automated model-based android gui tes-ting using multi-level gui comparison criteriaC]//Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering.2016:238-249.
[11]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.
[12]LI Y,YANG Z,GUO Y,et al.Droidbot:a lightweight ui-guided test input generator for android[C]//2017 IEEE/ACM 39th International Conference on Software Engineering Companion(ICSEC).IEEE,2017:23-26.
[13]CAI T,ZHANG Z,YANG P.Fastbot:A multi-agent model-based test generation system[C]//Proceedings of the IEEE/ACM 1st International Conference on Automation of Software Test.2020:93-96.
[14]LV Z,PENG C,ZHANG Z,et al.Fastbot2:Reusable Automated Model-based GUI Testing for Android Enhanced by Reinforcement Learning[C]//37th IEEE/ACM International Conference on Automated Software Engineering.2022:1-5.
[15]ADAMO D,KHAN M K,KOPPULA S,et al.Reinforcement learning for android gui testing[C]//Proceedings of the 9th ACM SIGSOFT International Workshop on Automating TEST Case Design,Selection,and Evaluation.2018:2-8.
[16]ZHOU Z.Machine Learning[M].Tsinghua University Press,2016.
[17]MARIANI L,PEZZE M,RIGANELLI O.Autoblacktest:Au-tomatic black-box testing of interactive applications[C]//2012 IEEE Fifth International Conference on Software Testing,Verification and Validation.IEEE,2012:81-90.
[18]KOROGLU Y,SEN A,MUSLU O.Qbe:Qlearning-based exploration of android applications[C]//2018 IEEE 11th International Conference on Software Testing,Verification and Validation(ICST).IEEE,2018:105-115.
[19]YASIN H N,HAMID S H A,RAJA YUSOF R J.Droidbotx:Test case generation tool for android applications using q-lear-ning[J].Symmetry,2021,13(2):310.
[20]LI Y,YANG Z,GUO Y,et al.A deep learning based approach to automated android app testing[J].arXiv:1901.02633,2019.
[21]VUONG T A T,TAKADA S.Semantic analysis for deep q-network in android gui testing[C]//SEKE.2019:123-170.
[22]SUTTON R S,BARTO A G.Reinforcement learning:An introduction[M].MIT Press,2018.
[23]WANG Y H,LI T H S,LIN C J.Backward q-learning:Thecombination of sarsa algorithm and q-learning[J].Engineering Applications of Artificial Intelligence,2013,26(9):2184-2193.
[24]GU T,CAO C,LIU T.Aimdroid:Activity-insulated multi-level automated testing for android applications[C]//2017 IEEE International Conference on Software Maintenance and Evolution(ICSME).IEEE,2017:103-114.
[25]KHAN M K,BRYCE R.Android gui test generation with sarsa[C]//2022 IEEE 12th Annual Computing and Communication Workshop and Conference(CCWC).IEEE,2022:487-493.
[26]CARINO S,ANDREWS J H.Dynamically testing GUIs using ant colony optimization(T)[C]//2015 30th IEEE/ACM International Conference on Automated Software Engineering(ASE).IEEE,2015:138-148.
[27]ABUL O,POLAT F,ALHAJJ R.Multiagent reinforcementlearning using function approximation[J].IEEE Transactions on Systems,Man,and Cybernetics,Part C(Applications and Reviews),2000,30(4):485-497,56.
[28]CHOUDHARY S R,GORLA A,ORSO A.Automated test input generation for android:Are we there yet?[C]//2015 30th IEEE/ACM International Conference on Automated Software Engineering(ASE).IEEE,2015:429-440.
[29]LAM W,WU Z,LI D.Record and replay for android:Are we there yet in industrial cases?[C]//Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering.2017:854-859.
[30]APKFab.[OL].https://apkfab.com/.
[31]Tencent Software Center[OL].https://pc.qq.com/.
[32]Google.Ui/application exerciser monkey[EB/OL].[2022-09-26].https://developer.android.com/studio/test/monkey.html.
[1] LIU Xingguang, ZHOU Li, ZHANG Xiaoying, CHEN Haitao, ZHAO Haitao, WEI Jibo. Edge Intelligent Sensing Based UAV Space Trajectory Planning Method [J]. Computer Science, 2023, 50(9): 311-317.
[2] LIN Xinyu, YAO Zewei, HU Shengxi, CHEN Zheyi, CHEN Xing. Task Offloading Algorithm Based on Federated Deep Reinforcement Learning for Internet of Vehicles [J]. Computer Science, 2023, 50(9): 347-356.
[3] XIONG Liqin, CAO Lei, CHEN Xiliang, LAI Jun. Value Factorization Method Based on State Estimation [J]. Computer Science, 2023, 50(8): 202-208.
[4] ZHANG Naixin, CHEN Xiaorui, LI An, YANG Leyao, WU Huaming. Edge Offloading Framework for D2D-MEC Networks Based on Deep Reinforcement Learningand Wireless Charging Technology [J]. Computer Science, 2023, 50(8): 233-242.
[5] XING Linquan, XIAO Yingmin, YANG Zhibin, WEI Zhengmin, ZHOU Yong, GAO Saijun. Spacecraft Rendezvous Guidance Method Based on Safe Reinforcement Learning [J]. Computer Science, 2023, 50(8): 271-279.
[6] JIN Tiancheng, DOU Liang, ZHANG Wei, XIAO Chunyun, LIU Feng, ZHOU Aimin. OJ Exercise Recommendation Model Based on Deep Reinforcement Learning and Program Analysis [J]. Computer Science, 2023, 50(8): 58-67.
[7] YUAN Jiangfeng, LI Haoxiang, YOU Wei, HUANG Jianjun, SHI Wenchang, LIANG Bin. Locating Third-party Library Functions in Obfuscated Applications [J]. Computer Science, 2023, 50(7): 293-301.
[8] ZENG Qingwei, ZHANG Guomin, XING Changyou, SONG Lihua. Intelligent Attack Path Discovery Based on Hierarchical Reinforcement Learning [J]. Computer Science, 2023, 50(7): 308-316.
[9] LIN Xiangyang, XING Qinghua, XING Huaixi. Study on Intelligent Decision Making of Aerial Interception Combat of UAV Group Based onMADDPG [J]. Computer Science, 2023, 50(6A): 220700031-7.
[10] FU Xiong, NIE Xiaohan, WANG Junchang. Study on Android Fake Application Detection Method Based on Interface Similarity [J]. Computer Science, 2023, 50(6A): 220300114-7.
[11] SHI Liang, WEN Liangming, LEI Sheng, LI Jianhui. Virtual Machine Consolidation Algorithm Based on Decision Tree and Improved Q-learning by Uniform Distribution [J]. Computer Science, 2023, 50(6): 36-44.
[12] WANG Hanmo, ZHENG Shijie, XU Ruonan, GUO Bin, WU Lei. Self Reconfiguration Algorithm of Modular Robot Based on Swarm Agent Deep Reinforcement Learning [J]. Computer Science, 2023, 50(6): 266-273.
[13] MIAO Kuan, LI Chongshou. Optimization Algorithms for Job Shop Scheduling Problems Based on Correction Mechanisms and Reinforcement Learning [J]. Computer Science, 2023, 50(6): 274-282.
[14] ZHANG Qiyang, CHEN Xiliang, CAO Lei, LAI Jun, SHENG Lei. Survey on Knowledge Transfer Method in Deep Reinforcement Learning [J]. Computer Science, 2023, 50(5): 201-216.
[15] YU Ze, NING Nianwen, ZHENG Yanliu, LYU Yining, LIU Fuqiang, ZHOU Yi. Review of Intelligent Traffic Signal Control Strategies Driven by Deep Reinforcement Learning [J]. Computer Science, 2023, 50(4): 159-171.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!