Skip to main content

Automation of User Interface Testing by Reinforcement Learning-Based Monkey Agents

  • Conference paper
  • First Online:
Complex Computational Ecosystems (CCE 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13927))

Included in the following conference series:

  • 120 Accesses

Abstract

The complexity of Graphical User Interfaces (GUIs) in consumer applications such as home appliances has significantly risen in recent years. For example, the number of different views in the GUIs has increased from simple selection views to complex sub-menu structures. Alongside the development, both testing complexity and cost have risen drastically. A way of handling this increase is test automation by the use of machine learning algorithms. This work focuses on reinforcement learning-based autonomous grey-box monkey testing for consumer GUIs. As a monkey tester, a Deep Q-Network is interacting with the device under test. Experiments are performed on an oven GUI as well as on a desktop training environment. A known feature representation for monkey testing is compared to three alternative representations, as well as a random agent. A careful selection of the feature representation can improve the exploration performance. Empirical results for the autonomous exploration of GUIs show the usefulness of reinforcement learning-based monkey testing over pure random testing on consumer GUIs. This can lead to an efficiency advantage in practice, as pure random testing is often the status quo in many well-known GUI test-frameworks such as Squish.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Adamo, D., Khan, M.K., Koppula, S., Bryce, R.: Reinforcement learning for android gui testing. In: Proceedings of the 9th ACM SIGSOFT International Workshop on Automating TEST Case Design, Selection, and Evaluation, pp. 2–8 (2018)

    Google Scholar 

  2. Agarap, A.F.: Deep learning using rectified linear units (relu). arXiv preprint arXiv:1803.08375 (2018)

  3. Conover, W.: Practical nonparametric statistics. Wiley, New York (1971)

    Google Scholar 

  4. Fraser, G., Wotawa, F.: Redundancy Based Test-Suite Reduction. In: Dwyer, M.B., Lopes, A. (eds.) Fundamental Approaches to Software Engineering, pp. 291–305. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  5. Gao, Y., Tao, C., Guo, H., Gao, J.: 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, pp. 262–276. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-25201-3_20

  6. Golberg, D.E.: Genetic algorithms in search, optimization, and machine learning. Addion wesley 1989(102), 36 (1989)

    Google Scholar 

  7. Hourani, H., Hammad, A., Lafi, M.: The impact of artificial intelligence on software testing. In: 2019 IEEE Jordan International Joint Conference on Electrical Engineering and Information Technology (JEEIT), pp. 565–570. IEEE (2019)

    Google Scholar 

  8. Hsu, H.Y., Orso, A.: MINTS: a general framework and tool for supporting test-suite minimization. In: 2009 IEEE 31st International Conference on Software Engineering, pp. 419–429 (2009)

    Google Scholar 

  9. Huang, R., Sun, W., Xu, Y., Chen, H., Towey, D., Xia, X.: A survey on adaptive random testing. IEEE Trans. Software Eng. 47(10), 2052–2083 (2019)

    Article  Google Scholar 

  10. Khan, M.E., Khan, F.: A comparative study of white box, black box and grey box testing techniques. Int. J. Adv. Comput. Sci. Appl. 3(6) (2012)

    Google Scholar 

  11. Kim, J., Kwon, M., Yoo, S.: Generating test input with deep reinforcement learning. In: 2018 IEEE/ACM 11th International Workshop on Search-Based Software Testing (SBST), pp. 51–58 (2018)

    Google Scholar 

  12. Kong, P., Li, L., Gao, J., Liu, K., Bissyandé, T.F., Klein, J.: Automated testing of android apps: a systematic literature review. IEEE Trans. Reliab. 68(1), 45–66 (2019)

    Article  Google Scholar 

  13. Lin, L.J.: Self-improving reactive agents based on reinforcement learning, planning and teaching. Mach. Learn. 8(3), 293–321 (1992)

    Article  Google Scholar 

  14. Mnih, V., Kavukcuoglu, K., Silver, D., Graves, A., Antonoglou, I., Wierstra, D., Riedmiller, M.: Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602 (2013)

  15. Mnih, V., et al.: Human-level control through deep reinforcement learning. Nature 518(7540), 529–533 (2015)

    Google Scholar 

  16. Moghadam, M.H., Saadatmand, M., Borg, M., Bohlin, M., Lisper, B.: Poster: performance testing driven by reinforcement learning. In: 2020 IEEE 13th International Conference on Software Testing, Validation and Verification (ICST), pp. 402–405 (2020)

    Google Scholar 

  17. Note Narciso, E., Delamaro, M., Nunes, F.: Test case selection: a systematic literature review. Int. J. Softw. Eng. Knowl. Eng.24, 653–676 (2014)

    Google Scholar 

  18. Patel, P., Srinivasan, G., Rahaman, S., Neamtiu, I.: On the effectiveness of random testing for android: or how i learned to stop worrying and love the monkey. In: Proceedings of the 13th International Workshop on Automation of Software Test, pp. 34–37 (2018)

    Google Scholar 

  19. Paydar, S.: Automated gui layout refactoring to improve monkey testing of android applications. In: 2020 CSI/CPSSI International Symposium on Real-Time and Embedded Systems and Technologies (RTEST), pp. 1–9. IEEE (2020)

    Google Scholar 

  20. Qt: Squish. https://www.qt.io/product/quality-assurance/squish (2003). Accessed 1 Dec 2022

  21. Ramler, R., Buchgeher, G., Klammer, C.: Adapting automated test generation to gui testing of industry applications. Inf. Softw. Technol. 93, 248–263 (2018)

    Article  Google Scholar 

  22. Romdhana, A., Merlo, A., Ceccato, M., Tonella, P.: Deep reinforcement learning for black-box testing of android apps. ACM Trans. Softw. Eng. Methodol. (2022)

    Google Scholar 

  23. Rosenbauer, L., Stein, A., Pätzel, D., Hähner, J.: XCSF with experience replay for automatic test case prioritization. In: Abbass, H., Coello, C.A.C., Singh, H.K. (eds.) 2020 IEEE Symposium Series on Computational Intelligence (SSCI), virtual event, Canberra, Australia, 1–4 December 2020. IEEE (2020)

    Google Scholar 

  24. Saber, S., et al.: Autonomous gui testing using deep reinforcement learning. In: 2021 17th International Computer Engineering Conference (ICENCO), pp. 94–100 (2021)

    Google Scholar 

  25. Spieker, H., Gotlieb, A., Marijan, D., Mossige, M.: Reinforcement learning for automatic test case prioritization and selection in continuous integration. CoRR abs/1811.04122 (2018)

    Google Scholar 

  26. Sutton, R.S., Barto, A.G.: Reinforcement Learning: An Introduction. A Bradford Book, Cambridge, MA, USA (2018)

    MATH  Google Scholar 

  27. Vuong, T.A.T., Takada, S.: A reinforcement learning based approach to automated testing of android applications. In: Proceedings of the 9th ACM SIGSOFT International Workshop on Automating TEST Case Design, Selection, and Evaluation, pp. 31–37 (2018)

    Google Scholar 

  28. Wang, Z., Bovik, A., Sheikh, H., Simoncelli, E.: Image quality assessment: from error visibility to structural similarity. IEEE Trans. Image Process. 13(4), 600–612 (2004)

    Article  Google Scholar 

  29. Watkins, C.J., Dayan, P.: Q-learning. Mach. Learn. 8(3), 279–292 (1992)

    Google Scholar 

  30. Wetzlmaier, T., Ramler, R., Putschögl, W.: A framework for monkey gui testing. In: 2016 IEEE International Conference on Software Testing, Verification and Validation (ICST), pp. 416–423. IEEE (2016)

    Google Scholar 

  31. Yoo, S., Harman, M.: Regression testing minimization, selection and prioritization: a survey. Softw. Test. Verif. Reliab. 22(2), 67–120 (2012)

    Article  Google Scholar 

  32. Yu, Y., Jones, J.A., Harrold, M.J.: An empirical study of the effects of test-suite reduction on fault localization. In: Proceedings of the 30th International Conference on Software Engineering, ICSE 2008, pp. 201–210. Association for Computing Machinery, New York, NY, USA (2008)

    Google Scholar 

  33. Zheng, Y., et al.: Wuji: automatic online combat game testing using evolutionary deep reinforcement learning. In: 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 772–784 (2019)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Daniel Gerber .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Gerber, D., Kapasiya, U., Rosenbauer, L., Hähner, J. (2023). Automation of User Interface Testing by Reinforcement Learning-Based Monkey Agents. In: Collet, P., Gardashova, L., El Zant, S., Abdulkarimova, U. (eds) Complex Computational Ecosystems. CCE 2023. Lecture Notes in Computer Science, vol 13927. Springer, Cham. https://doi.org/10.1007/978-3-031-44355-8_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-44355-8_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-44354-1

  • Online ISBN: 978-3-031-44355-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics