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.
翻译:移动应用在我们日常生活中无处不在,支持阅读、聊天等不同任务。尽管存在许多GUI测试工具,应用测试人员仍因工具频繁陷入循环或忽视隐蔽入口的活动而面临较低的测试代码覆盖率,导致大量测试时间被浪费在少数GUI页面的冗余重复探索上。为解决这一问题,我们利用安卓的深度链接(可触发Android Intent引导用户至特定页面),提出了一种深度链接增强的探索方法。该方法被集成到测试工具Monkey中,形成了Delm(深度链接增强型Monkey)。Delm通过监控动态探索过程,引导工具脱离无意义的测试循环,进入未探索的GUI页面。我们提出了一种严谨的活动上下文模拟方法,用于触发现有Android Intent,以发现更多具有隐藏入口的活动。通过实验评估Delm在活动上下文模拟、活动覆盖率、方法覆盖率和崩溃检测方面的效果,结果表明Delm能够模拟更复杂的活动上下文,并在活动覆盖率(27.2%)、方法覆盖率(21.13%)和崩溃检测率(23.81%)上显著超越现有最优基准方法。