一句话:提出自回放增强的录制/回放技术 WebRR,自动生成多重定位器并修复测试中断,显著提升 Web 端到端测试鲁棒性。
录制回放工具对 Web 应用质量保证十分重要,可捕获用户场景并在需要时自动执行。但现有技术生成的测试十分脆弱:现代 Web 应用的动态行为与频繁更新常导致测试中断(test breakage)。本文提出 WebRR,一种自回放增强的鲁棒录制/回放技术。其新颖之处在于录制阶段引入自回放机制,对录制模块捕获的事件进行在线校验,并自动生成多种定位器,包括 DOM 定位器、视觉定位器和邻近定位器,以提升生成测试用例的鲁棒性。在回放阶段,WebRR 组合使用多种定位器与新的局部工作流修复技术来修复测试中断,从而增强生成测试对应用频繁更新的适应能力。作者将方法应用于中国某大型电网公司部署的 3 个企业级 Web 应用上,实验结果表明 WebRR 有效,并显著提升了由录制回放技术生成的端到端 Web 测试的鲁棒性。
Record-and-replay tools are important for quality assurance of Web applications by capturing user case scenarios and executing them automatically when needed. However, the tests generated by existing techniques are brittle, and often lead to test breakages as the dynamic behavior and frequent updates of modern Web applications. In this paper, we propose WebRR, a self-replay enhanced robust record-and-replay technique for Web applications testing. The novelty of WebRR is that, it introduces a new self-replay mechanism in the recording phase, which checks the captured event from the record module online, and generates multiple locators (including DOM locators, visual locator and proximity locators) automatically, to improve the robustness of generated test cases. During the replay, it combines multiple locators and new local workflow repair technique to repair test breakages, and can improve the resilience of generated tests to frequent updates of the applications. We applied our approach to 3 enterprise Web applications, which are deployed in a large power grid company of China. The experimental results show that WebRR is effective, and substantially improve the robustness of end-to-end web tests that are generated using record-and-replay technique.
DOI 原文 ·
@inproceedings{paperbot5776,
title = {WebRR: self-replay enhanced robust record/replay for web application testing},
author = {Zhenyue Long and Guoquan Wu and Xiaojiang Chen and Wei Chen and Jun Wei},
booktitle = {FSE},
year = {2020},
doi = {10.1145/3368089.3417069}
}