Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3639477.3639749acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Hawkeye: Change-targeted Testing for Android Apps based on Deep Reinforcement Learning

Published: 31 May 2024 Publication History

Abstract

Android Apps are frequently updated to keep up with changing user, hardware, and business demands. Ensuring the correctness of App updates through extensive testing is crucial to avoid potential bugs reaching the end user. Existing Android testing tools generate GUI events that focus on improving the test coverage of the entire App rather than prioritising updates and impacted elements. Recent research has proposed change-focused testing but relies on random exploration to exercise change-impacted GUI elements that is ineffective and slow for large complex Apps with a huge input exploration space. At ByteDance, our established model-based GUI testing tool, Fastbot2, has been in successful deployment for nearly three years. Fastbot2 leverages event-activity transition models derived from past explorations to achieve enhanced test coverage efficiently. A pivotal insight we gained is that the knowledge of event-activity transitions is equally valuable in effectively targeting changes introduced by updates. This insight propelled our proposal for directed testing of updates with Hawkeye. Hawkeye excels in prioritizing GUI actions associated with code changes through deep reinforcement learning from historical exploration data.
In our empirical evaluation, we rigorously compared Hawkeye with state-of-the-art tools like Fastbot2 and ARES on 10 popular open-source Apps and a commercial App. The results showcased that Hawkeye consistently outperforms Fastbot2 and ARES in generating GUI event sequences that effectively target changed functions, both in open-source and commercial App contexts.
In real-world industrial deployment, Hawkeye is seamlessly integrated into our development pipeline, performing smoke testing for merge requests in a complex commercial App. The positive feedback received from our App development teams further affirmed Hawkeye's ability in testing App updates effectively.

References

[1]
Steven Arzt, Siegfried Rasthofer, Christian Fritz, Eric Bodden, Alexandre Bartel, Jacques Klein, Yves Le Traon, Damien Octeau, and Patrick McDaniel. 2014. Flowdroid: Precise context, flow, field, object-sensitive and lifecycle-aware taint analysis for android apps. Acm Sigplan Notices 49, 6 (2014), 259--269.
[2]
Young-Min Baek and Doo-Hwan Bae. 2016. Automated model-based Android GUI testing using multi-level GUI comparison criteria. In Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering. 238--249.
[3]
Nataniel P Borges, Jenny Hotzkow, and Andreas Zeller. 2018. DroidMate-2: a platform for Android test generation. In 2018 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 916--919.
[4]
Nataniel P Borges Jr, Maria Gómez, and Andreas Zeller. 2018. Guiding app testing with mined interaction models. In Proceedings of the 5th International Conference on Mobile Software Engineering and Systems. 133--143.
[5]
Wontae Choi, Koushik Sen, George Necul, and Wenyu Wang. 2018. DetReduce: minimizing Android GUI test suites for regression testing. In 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE). IEEE, 445--455.
[6]
Shauvik Roy Choudhary, Alessandra Gorla, and Alessandro Orso. 2015. Automated test input generation for android: Are we there yet?. In 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 429--440.
[7]
Eliane Collins, Arilo Neto, Auri Vincenzi, and José Maldonado. 2021. Deep reinforcement learning based Android application GUI testing. In Proceedings of the XXXV Brazilian Symposium on Software Engineering. 186--194.
[8]
Google Developers. [n. d.]. UI/Application Exerciser Monkey. https://developer.android.com/studio/test/monkey. Accessed: 2020-08-20.
[9]
Quan Do, Guowei Yang, Meiru Che, Darren Hui, and Jefferson Ridgeway. 2016. Regression test selection for android applications. In Proceedings of the International Conference on Mobile Software Engineering and Systems. 27--28.
[10]
Quan Chau Dong Do, Guowei Yang, Meiru Che, Darren Hui, and Jefferson Ridgeway. 2016. Redroid: A Regression Test Selection Approach for Android Applications. In SEKE. 486--491.
[11]
Yuemeng Gao, Chuanqi Tao, Hongjing Guo, and Jerry Gao. 2023. A Deep Reinforcement Learning-Based Approach for Android GUI Testing. In Web and Big Data: 6th International Joint Conference, APWeb-WAIM 2022, Nanjing, China, November 25--27, 2022, Proceedings, Part III. Springer, 262--276.
[12]
Tianxiao Gu, Chengnian Sun, Xiaoxing Ma, Chun Cao, Chang Xu, Yuan Yao, Qirun Zhang, Jian Lu, and Zhendong Su. 2019. Practical GUI testing of Android applications via model abstraction and refinement. In 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE). IEEE, 269--280.
[13]
Konrad Jamrozik and Andreas Zeller. 2016. DroidMate: a robust and extensible test generator for Android. In Proceedings of the International Conference on Mobile Software Engineering and Systems. 293--294.
[14]
Bo Jiang, Yu Wu, Yongfei Zhang, Zhenyu Zhang, and Wing-Kwong Chan. 2018. ReTestDroid: towards safer regression test selection for android application. In 2018 IEEE 42nd annual computer software and applications conference (COMPSAC), Vol. 1. IEEE, 235--244.
[15]
Xiao Li, Nana Chang, Yan Wang, Haohua Huang, Yu Pei, Linzhang Wang, and Xuandong Li. 2017. ATOM: Automatic maintenance of GUI test scripts for evolving mobile applications. In 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST). IEEE, 161--171.
[16]
Yuxi Li. 2017. Deep reinforcement learning: An overview. arXiv preprint arXiv:1701.07274 (2017).
[17]
Yuanchun Li, Ziyue Yang, Yao Guo, and Xiangqun Chen. 2017. Droidbot: a lightweight ui-guided test input generator for android. In 2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C). IEEE, 23--26.
[18]
Yuanchun Li, Ziyue Yang, Yao Guo, and Xiangqun Chen. 2019. Humanoid: A Deep Learning-based Approach to Automated Black-box Android App Testing. arXiv preprint arXiv:1901.02633 (2019).
[19]
Zhengwei Lv, Chao Peng, Zhao Zhang, Ting Su, Kai Liu, and Ping Yang. 2022. Fastbot2: Reusable Automated Model-based GUI Testing for Android Enhanced by Reinforcement Learning. In 37th IEEE/ACM International Conference on Automated Software Engineering. 1--5.
[20]
Aravind Machiry, Rohan Tahiliani, and Mayur Naik. 2013. Dynodroid: An input generation system for android apps. In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering. 224--234.
[21]
Nariman Mirzaei, Joshua Garcia, Hamid Bagheri, Alireza Sadeghi, and Sam Malek. 2016. Reducing combinatorics in GUI testing of android applications. In 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE). IEEE, 559--570.
[22]
Chanh-Duc Ngo, Fabrizio Pastore, and Lionel C Briand. 2022. ATUA: an update-driven app testing tool. In Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis. 765--768.
[23]
Paavai Paavai Anand et al. 2021. A brief study of deep reinforcement learning with epsilon-greedy exploration. International Journal Of Computing and Digital System (2021).
[24]
Minxue Pan, An Huang, Guoxin Wang, Tian Zhang, and Xuandong Li. 2020. Reinforcement learning based curiosity-driven testing of Android applications. In ISSTA. 153--164.
[25]
Chao Peng, Ajitha Rajan, and Tianqin Cai. 2021. Cat: Change-focused android gui testing. In 2021 IEEE International Conference on Software Maintenance and Evolution (ICSME). IEEE, 460--470.
[26]
Oliviero Riganelli, Simone Paolo Mottadelli, Claudio Rota, Daniela Micucci, and Leonardo Mariani. 2020. Data loss detector: automatically revealing data loss bugs in Android apps. In Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis. 141--152.
[27]
Andrea Romdhana, Alessio Merlo, Mariano Ceccato, and Paolo Tonella. 2022. Deep reinforcement learning for black-box testing of android apps. ACM Transactions on Software Engineering and Methodology (TOSEM) 31, 4 (2022), 1--29.
[28]
Aman Sharma and Rupesh Nasre. 2019. QADroid: regression event selection for Android applications. In Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis. 66--77.
[29]
RM Sharma. 2014. Quantitative analysis of automation and manual testing. International journal of engineering and innovative technology 4, 1 (2014).
[30]
Wei Song, Xiangxing Qian, and Jeff Huang. 2017. EHBDroid: Beyond GUI testing for Android applications. In 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 27--37.
[31]
Ting Su. 2016. FSMdroid: guided GUI testing of android apps. In 2016 IEEE/ACM 38th International Conference on Software Engineering Companion (ICSE-C). IEEE, 689--691.
[32]
Ting Su, Guozhu Meng, Yuting Chen, Ke Wu, Weiming Yang, Yao Yao, Geguang Pu, Yang Liu, and Zhendong Su. 2017. Guided, stochastic model-based GUI testing of Android apps. In Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering. 245--256.
[33]
Tommi Takala, Mika Katara, and Julian Harty. 2011. Experiences of system-level model-based GUI testing of an Android application. In 2011 Fourth IEEE International Conference on Software Testing, Verification and Validation. IEEE, 377--386.
[34]
Thomas Wetzlmaier and Rudolf Ramler. 2017. Hybrid monkey testing: enhancing automated GUI tests with random test generation. In Proceedings of the 8th ACM SIGSOFT International Workshop on Automated Software Testing. 5--10.
[35]
Shengqian Yang, Haowei Wu, Hailong Zhang, Yan Wang, Chandrasekar Swaminathan, Dacong Yan, and Atanas Rountev. 2018. Static window transition graphs for Android. Automated Software Engineering 25, 4 (2018), 833--873.

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE-SEIP '24: Proceedings of the 46th International Conference on Software Engineering: Software Engineering in Practice
April 2024
480 pages
ISBN:9798400705014
DOI:10.1145/3639477
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

In-Cooperation

  • Faculty of Engineering of University of Porto

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 31 May 2024

Check for updates

Author Tags

  1. software testing
  2. deep reinforcement learning
  3. Android
  4. graphical user interface

Qualifiers

  • Research-article

Conference

ICSE-SEIP '24
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 37
    Total Downloads
  • Downloads (Last 12 months)37
  • Downloads (Last 6 weeks)15
Reflects downloads up to 26 Sep 2024

Other Metrics

Citations

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media