一种基于主题判定的网页元素XPath定位器生成方法  被引量:4

Web Element XPath Locator Generation Approach Based on Topic Determination

在线阅读下载全文

作  者:张弛 高建华[1] ZHANG Chi;GAO Jian-hua(Department of Computer Science and Technology, Shanghai Normal University, Shanghai 200234, China)

机构地区:[1]上海师范大学计算机科学与技术系,上海200234

出  处:《小型微型计算机系统》2019年第4期872-878,共7页Journal of Chinese Computer Systems

基  金:国家自然科学基金项目(61672355)资助

摘  要:随着Web应用程序规模和结构复杂性的增加,回归测试行为往往受到时间等资源的限制,因此提高测试效率变得尤为重要.在传统的回归测试中,固定不变的网页元素定位器十分脆弱,往往会导致测试用例失效.对此本文提出一种基于主题的网页元素定位方法,以增加回归测试中网页元素定位器的鲁棒性.该方法首先通过"网页元素"-"特征词"-"主题"的转换来确定网页元素的主题,采用基于DOM树的深度优先搜索算法来自动生成网页元素的定位器.实验证明,基于主题判定的网页元素XPath定位器生成方法能有效地确定网页元素主题,增强网页元素的定位能力,提高网页元素定位器的鲁棒性,同时能在一定程度上提高测试的效率.As Web application size and structural complexity increase,regression testing behavior is often limited by resources such as time,so it is especially important to improve testing efficiency. In traditional regression testing,the fixed Web element locator is very fragile which often leads to test cases failure. In this paper,we proposed a Web page element localization approach based on topic in order to improve the robustness of Web element locators in regression testing. The approach identifies Web element topic at first by the conversion of "Web elements"-"feature words"-"topics",and then applies the Depth-First-Search algorithm based on DOM tree to automatically generate XPath locators for Web elements. The results of the experiments indicate that the Web element XPath locator generation approach based on determination can effectively identify the topic of Web elements which enhances the localization ability of Web elements and improves the robustness of Web element locators in Web application testing. To some extent,it can also improve the efficiency of Web testing.

关 键 词:WEB测试 网页元素 XPath定位 回归测试 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象