一句话:提出 COSER,融合 GUI 外部语义与源码内部语义修复过时 GUI 测试脚本,可应对较大界面变化。
移动应用界面随版本演化会使既有 GUI 测试脚本失效,而基于界面布局或图像匹配的修复方法仅在改动较小时有效,面对较大 GUI 变化容易失败。本文提出 COSER,一种面向过时 GUI 测试脚本的综合语义修复方法:它同时利用来自 GUI 元素的外部语义信息与来自源代码的内部语义信息,为失效的定位或操作步骤寻找语义上一致的替代目标,从而覆盖比现有方法更大的界面变化。作者在 20 个 Android 应用上评估,COSER 的修复效果优于当前最先进的工具 METER 和 GUIDER,并提供了可实际使用的工具实现。
Graphical User Interface (GUI) testing is one of the primary approaches for testing mobile apps. Test scripts serve as the main carrier of GUI testing, yet they are prone to obsolescence when the GUIs change with the apps' evolution. Existing repair approaches based on GUI layouts or images prove effective when the GUI changes between the base and updated versions are minor, however, they may struggle with substantial changes. In this paper, a novel approach named COSER is introduced as a solution to repairing broken scripts, which is capable of addressing larger GUI changes compared to existing methods. COSER incorporates both external semantic information from the GUI elements and internal semantic information from the source code to provide a unique and comprehensive solution. The efficacy of COSER was demonstrated through experiments conducted on 20 Android apps, resulting in superior performance when compared to the state-of-the-art tools METER and GUIDER. In addition, a tool that implements the COSER approach is available for practical use and future research.
@inproceedings{paperbot11393,
title = {Comprehensive Semantic Repair of Obsolete GUI Test Scripts for Mobile Applications},
author = {Shaoheng Cao and Minxue Pan and Yu Pei and Wenhua Yang and Tian Zhang and Linzhang Wang and Xuandong Li},
booktitle = {ICSE},
year = {2024},
doi = {10.1145/3597503.3639108}
}