一句话:提出 MigratePro,通过合成多个迁移测试用例生成可直接测试目标功能的 GUI 测试用例,减少人工修改并增强迁移效果。
GUI 测试用例迁移将源应用的测试用例迁移到目标应用以测试特定功能,但现有方法生成的用例往往无法直接使用,需人工修改,影响测试效果与迁移方法的实用性。本文提出 MigratePro,首个通过合成增强迁移的方法:对同一功能从多个源应用迁移来的多个测试用例,先合并相关 GUI 状态为整体状态序列,再据此组织事件与断言,删除应删内容并加入连接事件,使应保留的事件和断言可执行,从而合成新功能测试用例。在 30 个应用、34 个功能和 127 个测试用例上评估,MigratePro 增强 Craftdroid、AppFlow、ATM 后,目标功能测试能力分别提升 86%、333%、300%,体现通用性。
GUI test case migration is the process of migrating GUI test cases from a source app to a target app for a specific functionality. However, test cases obtained via existing migration approaches can hardly be directly used to test target functionalities and typically require additional manual modifications. This problem may significantly impact the effectiveness of testing target functionalities and the practical applicability of migration approaches. In this paper, we propose MigratePro, the first approach to enhancing GUI test case migration via synthesizing a new test case based on multiple test cases for the same functionality migrated from various source apps to the target app. The aim of MigratePro is to produce functional test cases with less human intervention. Specifically, given multiple migrated test cases for the same functionality in the target app, MigratePro first combines all the GUI states related to these migrated test cases into an overall state-sequence. Then, MigratePro organizes events and assertions from migrated test cases according to the overall state-sequence and endeavors to remove the should-be-removed events and assertions, while also incorporating some connection events in order to make the should-be-included events and assertions executable. Our evaluation on 30 apps, 34 functionalities, and 127 test cases shows that MigratePro improves the capability of three representative migration approaches (i.e., Craftdroid, AppFlow, ATM), successfully improving testing the target functionalities by 86%, 333%, and 300%, respectively. These results underscore the generalizability of MigratePro for effectively enhancing migration approaches.
DOI 原文 ·
@inproceedings{paperbot8591,
title = {Synthesis-Based Enhancement for GUI Test Case Migration},
author = {Yakun Zhang and Qihao Zhu and Jiwei Yan and Chen Liu and Wenjie Zhang and Yifan Zhao and Dan Hao and Lu Zhang},
booktitle = {ISSTA},
year = {2024},
doi = {10.1145/3650212.3680327}
}