填补空白:用于移动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%的页面,并随后帮助揭示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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。