计算机应用研究2017,Vol.34Issue(5):1393-1396,4.DOI:10.3969/j.issn.1001-3695.2017.05.026
基于XPath路径的Web应用测试脚本修复
Web application test scripts based on XPath path
摘要
Abstract
The iteration of Web application version was frequent,generating a new set of test scripts was expensive,so,for testing new version of the Web application,repairing the existing test scripts set was the best option.Due to changes in the structure of Web application page caused execution error of the old set of test scripts,this paper presented a method to automatically repair the disabled test scripts.The method made use of Selenium IDE to record test scripts in older version of the application,and played back the recorded test scripts in the new version of the application,generated an error test report.According to XPath and value of each disabled test scripts in the test report,by traversing the old and new application pages on the parse tree document object model (DOM tree),found the path and assertions value of the script to replace and repair disabled test scripts.Finally,experimental results show that the method is feasible and effective in repairing disabled test scripts.关键词
XPath路径/Selenium IDE/Web应用程序/DOM tree/测试脚本修复Key words
XPath path/Selenium IDE/Web application/DOM tree/test scripts repair分类
信息技术与安全科学引用本文复制引用
王曙燕,王璇,孙家泽..基于XPath路径的Web应用测试脚本修复[J].计算机应用研究,2017,34(5):1393-1396,4.基金项目
陕西省工业攻关资助项目(2016GY-089) (2016GY-089)
陕西省自然科学基金资助项目(2015JM6359) (2015JM6359)
陕西省教育厅自然科学基金资助项目(15JK1672) (15JK1672)