arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.19307cs.SEcs.CR
收藏

利用深度链接集成 Monkey 提升 Android 应用的 GUI 探索覆盖率

Enhancing GUI Exploration Coverage of Android Apps with Deep Link-Integrated Monkey

Han Hu, Han Wang, Ruiqi Dong, Xiao Chen, Chunyang Chen

AI总结:

本文提出深度链接增强的 Monkey 测试工具 Delm,通过触发 Android intent 模拟 Activity 上下文并引导探索过程跳出循环,从而显著提升 Activity 覆盖率、方法覆盖率和崩溃检测能力。

摘要:

移动应用在我们的日常生活中无处不在,用于支持阅读和聊天等不同任务。尽管已有许多 GUI 测试工具可用,应用测试人员仍然面临测试代码覆盖率低的问题,因为工具经常陷入循环或忽略具有隐藏入口的 Activity。这导致大量测试时间被花费在少数几个 GUI 页面的冗余和重复探索上。为了解决这一问题,我们利用 Android 的深度链接(deep links),它有助于触发 Android intent 将用户引导到特定页面,并引入了一种深度链接增强的探索方法。该方法集成到测试工具 Monkey 中,形成了 Delm(Deep Link-enhanced Monkey,深度链接增强的 Monkey)。Delm 监督动态探索过程,引导工具走出无意义的测试循环,前往未探索的 GUI 页面。我们提供了一种严格的 Activity 上下文模拟(activity context mock-up)方法,用于触发现有的 Android intent,以发现更多具有隐藏入口的 Activity。我们进行了实验,以评估 Delm 在 Activity 上下文模拟、Activity 覆盖率、方法覆盖率和崩溃检测方面的有效性。实验结果表明,Delm 能够模拟更复杂的 Activity 上下文,并显著优于最先进的基线方法,实现了 27.2% 的 Activity 覆盖率、21.13% 的方法覆盖率和 23.81% 的崩溃检测率。

英文摘要:

Mobile apps are ubiquitous in our daily lives for supporting different tasks such as reading and chatting. Despite the availability of many GUI testing tools, app testers still struggle with low testing code coverage due to tools frequently getting stuck in loops or overlooking activities with concealed entries. This results in a significant amount of testing time being spent on redundant and repetitive exploration of a few GUI pages. To address this, we utilize Android's deep links, which assist in triggering Android intents to lead users to specific pages and introduce a deep link-enhanced exploration method. This approach, integrated into the testing tool Monkey, gives rise to Delm (Deep Link-enhanced Monkey). Delm oversees the dynamic exploration process, guiding the tool out of meaningless testing loops to unexplored GUI pages. We provide a rigorous activity context mock-up approach for triggering existing Android intents to discover more activities with hidden entrances. We conduct experiments to evaluate Delm's effectiveness on activity context mock-up, activity coverage, method coverage, and crash detection. The findings reveal that Delm can mock up more complex activity contexts and significantly outperform state-of-the-art baselines with 27.2\% activity coverage, 21.13\% method coverage, and 23.81\% crash detection.

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

↑