论文标题
布局和图像识别驾驶跨平台自动化移动测试
Layout and Image Recognition Driving Cross-Platform Automated Mobile Testing
论文作者
论文摘要
分裂问题已从Android扩展到不同平台,例如iOS,移动Web,甚至在某些应用程序(APP)中。在这种情况下,录制和重播测试脚本是一种流行的自动移动应用测试方法。但是,这种方法在越过平台时会遇到严重的问题。需要开发同一应用程序的不同版本,以支持依靠不同平台支持的不同平台。因此,移动应用程序开发人员需要为旨在完全相同的测试要求的多个平台开发和维护测试脚本,从而大大增加了测试成本。但是,我们发现开发人员在不同平台上为同一应用程序的版本采用了高度相似的用户界面布局。这样的现象激发了我们从类似的UI布局的角度重播测试脚本。我们提出了一个图像驱动的移动应用测试框架,利用小部件功能匹配和布局表征匹配。我们使用计算机视觉技术在应用程序屏幕截图上执行UI功能比较和布局层次结构提取,以获取具有丰富上下文信息的UI结构,包括坐标,相对关系等。基于获得的UI结构,我们可以形成独立于平台的测试脚本,然后在测试中找到目标窗口件。因此,提出的框架非侵入性地根据新颖的与平台独立的测试脚本模型重复测试脚本。我们还设计并实施了一种名为LIT的工具,以将拟议的框架投入实践,根据该框架,我们进行了一项经验研究,以评估拟议的测试框架的有效性和可用性。结果表明,Android的整体重播准确度(比最新方法提高了14%),iOS的总重质精度为21.83%(比最先进的方法提高了21.83%)。
The fragmentation problem has extended from Android to different platforms, such as iOS, mobile web, and even mini-programs within some applications (app). In such a situation, recording and replaying test scripts is a popular automated mobile app testing approaches. But such approach encounters severe problems when crossing platforms. Different versions of the same app need to be developed to support different platforms relying on different platform supports. Therefore, mobile app developers need to develop and maintain test scripts for multiple platforms aimed at completely the same test requirements, greatly increasing testing costs. However, we discover that developers adopt highly similar user interface layouts for versions of the same app on different platforms. Such a phenomenon inspires us to replay test scripts from the perspective of similar UI layouts. We propose an image-driven mobile app testing framework, utilizing Widget Feature Matching and Layout Characterization Matching. We use computer vision technologies to perform UI feature comparison and layout hierarchy extraction on app screenshots to obtain UI structures with rich contextual information, including coordinates, relative relationship, etc. Based on acquired UI structures, we can form a platform-independent test script, and then locate the target widgets under test. Thus, the proposed framework non-intrusively replays test scripts according to a novel platform-independent test script model. We also design and implement a tool named LIT to devote the proposed framework into practice, based on which, we conduct an empirical study to evaluate the effectiveness and usability of the proposed testing framework. Results show that the overall replay accuracy reaches around 63.39% on Android (14% improvement over state-of-the-art approaches) and 21.83% on iOS (98% improvement over state-of-the-art approaches).