一句话:提出利用应用视觉分析自动修复 Web 测试失效的技术 Vista,平均可修复 81% 的失效。
Web 测试随着被测应用的演化极易失效,给实践带来沉重的维护负担。开发者通常通过 GUI 检查测试与应用的交互来定位失效根因,而现有自动修复技术只关注代码,完全忽略了应用的视觉信息。本文提出一种由视觉分析驱动的测试修复技术:从测试执行中捕获相关视觉信息,并通过快速图像处理流水线在测试重执行用于回归时对其进行视觉验证,随后向测试人员报告失效发生情况与潜在修复方案。该方法还配备了局部爬取机制,以应对需要修复测试工作流等非平凡的失效场景。作者实现了工具 Vista,并在四个 Web 应用的 86 个发布版本、共 2672 个测试用例上开展实证评估,结果表明 Vista 平均能修复 81% 的失效,相比现有技术提升 41%。
Web tests are prone to break frequently as the application under test evolves, causing much maintenance effort in practice. To detect the root causes of a test breakage, developers typically inspect the test's interactions with the application through the GUI. Existing automated test repair techniques focus instead on the code and entirely ignore visual aspects of the application. We propose a test repair technique that is informed by a visual analysis of the application. Our approach captures relevant visual information from tests execution and analyzes them through a fast image processing pipeline to visually validate test cases as they re-executed for regression purposes. Then, it reports the occurrences of breakages and potential fixes to the testers. Our approach is also equipped with a local crawling mechanism to handle non-trivial breakage scenarios such as the ones that require to repair the test's workflow. We implemented our approach in a tool called Vista. Our empirical evaluation on 2,672 test cases spanning 86 releases of four web applications shows that Vista is able to repair, on average, 81% of the breakages, a 41% increment with respect to existing techniques.
DOI 原文 ·
@inproceedings{paperbot4644,
title = {Visual web test repair},
author = {Andrea Stocco and Rahulkrishna Yandrapally and Ali Mesbah},
booktitle = {FSE},
year = {2018},
doi = {10.1145/3236024.3236063}
}