论文标题
填写空白:移动GUI测试的上下文感知自动化文本输入生成
Fill in the Blank: Context-aware Automated Text Input Generation for Mobile GUI Testing
论文作者
论文摘要
自动GUI测试被广泛用于帮助确保移动应用的质量。但是,许多GUI需要适当的文本输入才能继续下一页,这仍然是测试覆盖范围的重要障碍。考虑到有效输入的多样性和语义要求(例如,飞行出发,电影名称),自动化文本输入生成是一项挑战。受到预先训练的大语言模型(LLM)在文本生成方面取得的出色进步的启发,我们提出了一种基于LLM的名为QTypist的方法,用于根据GUI上下文智能生成语义输入文本。为了提高LLM在移动测试方案中的性能,我们开发了一种基于及时的数据构建和调整方法,该方法将自动提取模型调整的提示和答案。我们在Google Play的106个应用程序上评估了QTypist,结果表明,QTypist的及格率为87%,比最佳基线高93%。我们还将QTypist与自动GUI测试工具集成在一起,它可以覆盖42%的应用程序活动,52%的页面,随后帮助揭示了与RAW工具相比,揭示了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.