下载PDF
{"title":"Robula+: an algorithm for generating robust XPath locators for web testing","authors":"Maurizio Leotta, Andrea Stocco, Filippo Ricca, Paolo Tonella","doi":"10.1002/smr.1771","DOIUrl":null,"url":null,"abstract":"<p>Automated test scripts are used with success in many web development projects, so as to automatically verify key functionalities of the web application under test, reveal possible regressions and run a large number of tests in short time. However, the adoption of automated web testing brings advantages but also novel problems, among which the test code fragility problem. During the evolution of the web application, existing test code may easily break and testers have to correct it. In the context of automated DOM-based web testing, one of the major costs for evolving the test code is the manual effort necessary to repair broken web page element locators – lines of source code identifying the web elements (e.g. form fields and buttons) to interact with.</p><p>In this work, we present <span>Robula+</span>, a novel algorithm able to generate robust XPath-based locators – locators that are likely to work correctly on new releases of the web application. We compared <span>Robula+</span> with several state of the practice/art XPath locator generator tools/algorithms. Results show that XPath locators produced by <span>Robula+</span> are by far the most robust. Indeed, <span>Robula+</span> reduces the locators' fragility on average by 90% w.r.t. absolute locators and by 63% w.r.t. Selenium IDE locators. Copyright © 2016 John Wiley & Sons, Ltd.</p>","PeriodicalId":48898,"journal":{"name":"Journal of Software-Evolution and Process","volume":"28 3","pages":"177-204"},"PeriodicalIF":1.7000,"publicationDate":"2016-03-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1002/smr.1771","citationCount":"63","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Software-Evolution and Process","FirstCategoryId":"94","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1002/smr.1771","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 63
引用
批量引用
Abstract
Automated test scripts are used with success in many web development projects, so as to automatically verify key functionalities of the web application under test, reveal possible regressions and run a large number of tests in short time. However, the adoption of automated web testing brings advantages but also novel problems, among which the test code fragility problem. During the evolution of the web application, existing test code may easily break and testers have to correct it. In the context of automated DOM-based web testing, one of the major costs for evolving the test code is the manual effort necessary to repair broken web page element locators – lines of source code identifying the web elements (e.g. form fields and buttons) to interact with.
In this work, we present Robula+ , a novel algorithm able to generate robust XPath-based locators – locators that are likely to work correctly on new releases of the web application. We compared Robula+ with several state of the practice/art XPath locator generator tools/algorithms. Results show that XPath locators produced by Robula+ are by far the most robust. Indeed, Robula+ reduces the locators' fragility on average by 90% w.r.t. absolute locators and by 63% w.r.t. Selenium IDE locators. Copyright © 2016 John Wiley & Sons, Ltd.
Robula+:为web测试生成健壮的XPath定位器的算法
自动化测试脚本在许多web开发项目中得到了成功的应用,它可以自动验证被测web应用程序的关键功能,揭示可能的回归,并在短时间内运行大量的测试。然而,采用自动化web测试带来了优势,但也带来了新的问题,其中包括测试代码的脆弱性问题。在web应用程序的发展过程中,现有的测试代码可能很容易被破坏,测试人员必须纠正它。在基于dom的自动化web测试环境中,开发测试代码的主要成本之一是修复损坏的web页面元素定位器所必需的手工工作——识别要与之交互的web元素(例如表单字段和按钮)的源代码行。在这项工作中,我们介绍了Robula+,一种能够生成健壮的基于xpath的定位器的新算法-定位器可能在新版本的web应用程序上正确工作。我们将Robula+与几种最先进的XPath定位器生成器工具/算法进行了比较。结果表明,由Robula+生成的XPath定位器是迄今为止最健壮的。实际上,Robula+将定位器的脆弱性相对于绝对定位器平均降低了90%,相对于Selenium IDE定位器平均降低了63%。版权所有©2016 John Wiley &儿子,有限公司
本文章由计算机程序翻译,如有差异,请以英文原文为准。