测试极限:利用大型语言模型生成异常文本输入以检测移动应用崩溃
Testing the Limits: Unusual Text Inputs Generation for Mobile App Crash Detection with Large Language Model
AI总结:
本文提出InputBlaster,利用LLM自动生成异常文本输入以检测移动应用崩溃,通过生成测试生成器及变异规则实现78%的bug检测率,并在真实应用中发现37个新崩溃。
摘要:
移动应用已成为我们日常生活中无处不在的一部分,为用户提供各种服务和实用工具的访问。文本输入作为用户与应用之间的重要交互渠道,在搜索查询、身份验证、消息传递等核心功能中发挥着重要作用。然而,某些特殊文本(例如,字体大小输入-18)可能导致应用崩溃,因此生成多样化的异常输入以全面测试应用的需求非常迫切。尽管如此,由于组合爆炸困境、高度上下文敏感性和复杂约束关系的结合,这也极具挑战性。本文提出了InputBlaster,它利用LLM自动生成异常文本输入,用于移动应用崩溃检测。它将异常输入生成问题表述为生成一组测试生成器的任务,每个测试生成器可以在相同的变异规则下产生一批异常文本输入。具体而言,InputBlaster利用LLM生成测试生成器,并将变异规则作为推理链,同时利用上下文学习模式向LLM展示示例以提升性能。InputBlaster在涉及31个流行Android应用的36个带有崩溃bug的文本输入控件上进行了评估,结果显示其达到了78%的bug检测率,比最佳基线高出136%。此外,我们将其与自动化GUI测试工具集成,并在来自Google Play的真实应用中检测到37个未见过的崩溃。
英文摘要:
Mobile applications have become a ubiquitous part of our daily life, providing users with access to various services and utilities. Text input, as an important interaction channel between users and applications, plays an important role in core functionality such as search queries, authentication, messaging, etc. However, certain special text (e.g., -18 for Font Size) can cause the app to crash, and generating diversified unusual inputs for fully testing the app is highly demanded. Nevertheless, this is also challenging due to the combination of explosion dilemma, high context sensitivity, and complex constraint relations. This paper proposes InputBlaster which leverages the LLM to automatically generate unusual text inputs for mobile app crash detection. It formulates the unusual inputs generation problem as a task of producing a set of test generators, each of which can yield a batch of unusual text inputs under the same mutation rule. In detail, InputBlaster leverages LLM to produce the test generators together with the mutation rules serving as the reasoning chain, and utilizes the in-context learning schema to demonstrate the LLM with examples for boosting the performance. InputBlaster is evaluated on 36 text input widgets with cash bugs involving 31 popular Android apps, and results show that it achieves 78% bug detection rate, with 136% higher than the best baseline. Besides, we integrate it with the automated GUI testing tool and detect 37 unseen crashes in real-world apps from Google Play.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。