Fill in the blank: Context-aware automated text input generation for mobile GUI testing

Zhe Liu, Chunyang Chen, Junjie Wang, Xing Che, Yuekai Huang, Jun Hu, Qing Wang

Research output: Chapter in Book/Report/Conference proceedingConference PaperResearchpeer-review

47 Citations (Scopus)

Abstract

Automated GUI testing is widely used to help ensure the quality of mobile apps. However, many GUIs require appropriate text inputs to proceed to the next page, which remains a prominent obstacle for testing coverage. Considering the diversity and semantic requirement of valid inputs (e.g., flight departure, movie name), it is challenging to automate the text input generation. Inspired by the fact that the pre-trained Large Language Model (LLM) has made outstanding progress in text generation, we propose an approach named QTypist based on LLM for intelligently generating semantic input text according to the GUI context. To boost the performance of LLM in the mobile testing scenario, we develop a prompt-based data construction and tuning method which automatically extracts the prompts and answers for model tuning. We evaluate QTypist on 106 apps from Google Play, and the result shows that the passing rate of QTypist is 87%, which is 93% higher than the best baseline. We also integrate QTypist with the automated GUI testing tools and it can cover 42% more app activities, 52% more pages, and subsequently help reveal 122% more bugs compared with the raw tool.

Original languageEnglish
Title of host publicationProceedings - 2023 IEEE/ACM 45th International Conference on Software Engineering, ICSE 2023
EditorsLori Pollock, Massimiliano Di Penta
Place of PublicationPiscataway NJ USA
PublisherIEEE, Institute of Electrical and Electronics Engineers
Pages1355-1367
Number of pages13
ISBN (Electronic)9781665457019
ISBN (Print)9781665457026
DOIs
Publication statusPublished - 2023
EventInternational Conference on Software Engineering 2023 - Melbourne, Australia
Duration: 15 May 202316 May 2023
Conference number: 45th
https://ieeexplore.ieee.org/xpl/conhome/10172484/proceeding (Proceedings)
https://conf.researchr.org/home/icse-2023 (Website)

Conference

ConferenceInternational Conference on Software Engineering 2023
Abbreviated titleICSE 2023
Country/TerritoryAustralia
CityMelbourne
Period15/05/2316/05/23
Internet address

Keywords

  • Android app
  • GUI testing
  • Large language model
  • Prompt-tuning
  • Text input generation

Cite this