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.
翻译:尽管进行了大量研究并提出了若干解决办法,但基于图形用户界面的测试自动化测试(脆弱)的测试执行是一项普遍报告的挑战。测试脚本需要耐受测试应用程序(最小)变化的影响,但同时也在发现需要调查的潜在问题时失败。测试脚本脆弱性是一个多方面的问题,但一个关键的挑战是在网站在发布或失败之间演变时可靠地确定和定位正确的目标网络要素,并报告一个问题。本文件提出并评价了一种叫作基于类似功能的网络元素本地化(Similo)的新办法,该办法利用多个网络元素定位参数的信息,利用加权相似性评分确定目标要素。实验研究将Similo比起网络元素本地化的基准方法。为了获得广泛的经验基础,我们的目标是在互联网上最受欢迎的网站网站有40个在发布版本的发布或出现其他失败时找到正确的网络要素数量,与在更老版本中存在的网络元素数量比较。实验结果显示,Similo超越了当前正值定位目标的更高基线值,在模拟的网络基准值中,在模拟基线研究中没有找到比重的准确的178-98基准案例。