arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.06763cs.SE
收藏

通过LLM赋能的UI陷阱逃脱提升随机测试

Improving Random Testing via LLM-powered UI Tarpit Escaping for Mobile Apps

East China Normal University(华东师范大学);Shanghai Innovation Institute(上海创新 institute)

Mengqian Xu, Yiheng Xiong, Le Chang, Ting Su, Chengcheng Wan, Weikai Miao

AI总结:

本文提出基于LLM的随机GUI测试方法,通过监控UI相似性识别陷阱并建议事件逃离,提升移动应用测试覆盖率和bug发现率,实验显示HybridMonkey和HybridDroidbot在12个应用上平均覆盖率提升54.8%和44.8%。

摘要:

随机GUI测试是测试移动应用广泛使用的技术。然而,其有效性受到著名的UI探索陷阱问题限制,即探索被困在局部UI区域,从而阻碍测试覆盖率和bug发现。在本文的经验论文中,我们介绍了一种新的混合测试方法,即基于LLM的随机GUI测试,用于在随机测试过程中缓解UI陷阱问题。我们的方法监控UI相似性以识别陷阱,并查询LLM建议有前途的事件以逃离遇到的陷阱。我们基于两种不同的自动化输入生成(AIG)工具在移动应用上实现了该方法:(1)HybridMonkey upon Monkey,一种现有工具;(2)HybridDroidbot upon Droidbot,一种最先进的工具。我们对12个流行的真实应用进行了评估。结果表明,HybridMonkey和HybridDroidbot优于所有基线,分别实现了平均覆盖率提升54.8%和44.8%,并检测到最多的唯一崩溃。总共发现了75个独特的bug,包括34个以前未知的bug。截至目前,26个bug已被确认并修复。我们还应用HybridMonkey于WeChat,一个拥有数亿月活跃用户的流行工业应用。HybridMonkey在活动覆盖率和发现bug方面优于随机测试。

英文摘要:

Random GUI testing is a widely-used technique for testing mobile apps. However, its effectiveness is limited by the notorious issue -- UI exploration tarpits, where the exploration is trapped in local UI regions, thus impeding test coverage and bug discovery. In this experience paper, we introduce LLM-powered random GUI Testing, a novel hybrid testing approach to mitigating UI tarpits during random testing. Our approach monitors UI similarity to identify tarpits and query LLMs to suggest promising events for escaping the encountered tarpits. We implement our approach on top of two different automated input generation (AIG) tools for mobile apps: (1) HybridMonkey upon Monkey, a state-of-the-practice tool; and (2) HybridDroidbot upon Droidbot, a state-of-the-art tool. We evaluated them on 12 popular, real-world apps. The results show that HybridMonkey and HybridDroidbot outperform all baselines, achieving average coverage improvements of 54.8% and 44.8%, respectively, and detecting the highest number of unique crashes. In total, we found 75 unique bugs, including 34 previously unknown bugs. To date, 26 bugs have been confirmed and fixed. We also applied HybridMonkey on WeChat, a popular industrial app with billions of monthly active users. HybridMonkey achieved higher activity coverage and found more bugs than random testing.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑