As Augmented Reality (AR) becomes more and more embedded in daily life, ensuring the quality, safety, and reliability of AR applications is increasingly important. However, AR apps present unique challenges for automated testing. Unlike static GUI layouts in traditional mobile apps, AR apps acquire their interaction interface from the surrounding environment, which is volatile and non-deterministic. Recent advancements like ARCore Playback and ARKit Replay allow developers to reuse real-world scenarios by recording and playing back enriched videos, enabling more feasible automated AR testing. However, using playback videos introduces two major challenges: test inputs must be timed precisely, and interactive areas in the video are dynamic, irregular, and difficult to identify. To address these challenges, we propose TARIPlay, a framework that analyzes playback videos to detect, track, and filter proper interactive areas over time for automated testing. In particular, TARIPlay identifies viable test opportunities based on criteria like stability and visibility, then feeds this information to an automated testing engine to simulate user interactions. We perform an experiment with four open-source AR apps and nine playback videos. Evaluation results show that TARIPlay significantly outperforms the existing tool Monkey in test coverage (55.8% over 41.98% on branch coverage) of AR-related code, and can also be used to assess the quality of playback videos for testing suitability.
翻译:随着增强现实(AR)日益融入日常生活,确保AR应用的质量、安全性和可靠性变得愈发重要。然而,AR应用为自动化测试带来了独特挑战。与传统移动应用中固定的GUI布局不同,AR应用从周围环境获取交互界面,这种环境具有易变性和非确定性。ARCore Playback和ARKit Replay等最新进展允许开发者通过录制和回放增强视频来复用真实场景,从而使自动化AR测试更加可行。然而,使用回放视频带来了两大挑战:测试输入必须精确计时,且视频中的交互区域动态、不规则且难以识别。为应对这些挑战,我们提出TARIPlay框架,该框架分析回放视频以检测、跟踪和过滤随时间变化的合适交互区域,用于自动化测试。具体而言,TARIPlay基于稳定性和可见性等标准识别可行的测试机会,然后将这些信息输入自动化测试引擎以模拟用户交互。我们使用四个开源AR应用和九个回放视频进行了实验。评估结果表明,TARIPlay在AR相关代码的测试覆盖率(分支覆盖率55.8%对比41.98%)上显著优于现有工具Monkey,还可用于评估回放视频的测试适用性质量。