论文标题
基于相似性的Web元素本地化用于鲁棒测试自动化
Similarity-based web element localization for robust test automation
论文作者
论文摘要
尽管进行了大量研究和一些建议的解决方案,但非舒适(脆弱的)测试执行是基于GUI的测试自动化的常见挑战。测试脚本需要对测试应用程序的(次要)变化具有弹性,但同时在检测需要调查的潜在问题时失败。测试脚本脆弱性是一个多方面的问题,但是当网站在发布或以其他方式失败和报告问题之间发展时,一个至关重要的挑战是可靠地识别和找到正确的目标网络元素。本文提出并评估了一种称为基于相似性的Web元素本地化(SIMILO)的新方法,该方法利用来自多个Web元素定位参数的信息来使用加权相似性分数来识别目标元素。实验研究将Similo与Web元素定位的基线方法进行了比较。为了获得广泛的经验基础,我们在评估中针对互联网上最受欢迎的40个网站。通过计算最近网站版本中的Web元素数量与较旧版本中存在的网站版本相比,可以考虑鲁棒性。实验的结果表明,Similo的表现优于代表当前最新技术的基线。它未能在598个考虑案例中的72个中找到正确的目标Web元素,而基线方法的146个案例。这项研究提出了证据,表明在试图定位网络元素的多个属性之间的相似性(如我们提出的Similo方法)是有益的。具有可接受的效率,Similo比基线Web元素定位方法具有明显更高的效率(即鲁棒性)。
Non-robust (fragile) test execution is a commonly reported challenge in GUI-based test automation, despite much research and several proposed solutions. A test script needs to be resilient to (minor) changes in the tested application but, at the same time, fail when detecting potential issues that require investigation. Test script fragility is a multi-faceted problem, but one crucial challenge is reliably identifying and locating the correct target web elements when the website evolves between releases or otherwise fails and reports an issue. This paper proposes and evaluates a novel approach called similarity-based web element localization (Similo), which leverages information from multiple web element locator parameters to identify a target element using a weighted similarity score. The experimental study compares Similo to a baseline approach for web element localization. To get an extensive empirical basis, we target 40 of the most popular websites on the Internet in our evaluation. Robustness is considered by counting the number of web elements found in a recent website version compared to how many of these existed in an older version. Results of the experiment show that Similo outperforms the baseline representing the current state-of-the-art; it failed to locate the correct target web element in 72 out of 598 considered cases compared to 146 failed cases for the baseline approach. This study presents evidence that quantifying the similarity between multiple attributes of web elements when trying to locate them, as in our proposed Similo approach, is beneficial. With acceptable efficiency, Similo gives significantly higher effectiveness (i.e., robustness) than the baseline web element localization approach.