一句话:提出基于LLM的QTypist,依据GUI上下文自动生成移动应用测试文本输入。
移动应用GUI测试中,许多界面需要合适的文本输入才能进入下一页,而有效输入具有多样性和语义要求,自动生成困难。本文提出基于大语言模型(LLM)的QTypist,利用GUI上下文智能生成语义文本输入;为适应移动测试场景,设计了基于提示的数据构建与调优方法,可自动抽取提示和答案用于模型微调。在Google Play的106个应用上评估,QTypist通过率为87%,比最佳基线高93%;集成到自动化GUI测试工具后,可多覆盖42%的Activity、52%的页面,并多发现122%的缺陷。
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.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{LiuCWCHHW23,
title = {Fill in the Blank: Context-aware Automated Text Input Generation for Mobile GUI Testing},
author = {Zhe Liu and Chunyang Chen and Junjie Wang and Xing Che and Yuekai Huang and Jun Hu and Qing Wang},
booktitle = {ICSE},
year = {2023},
doi = {10.1109/icse48619.2023.00119}
}