首页 | 官方网站   微博 | 高级检索  
     

基于页面聚类的Web应用测试方法研究
引用本文:尤 枫,张雅峰,赵瑞莲,马金慧.基于页面聚类的Web应用测试方法研究[J].计算机工程与应用,2018,54(5):51-56.
作者姓名:尤 枫  张雅峰  赵瑞莲  马金慧
作者单位:北京化工大学 信息科学与技术学院,北京 100029
摘    要:现有的Web测试是由前端出发,通过分析页面DOM结构来获取状态与状态跳转的条件。但现有技术是将任何DOM节点的改变都认定为产生了新的DOM树,如果对于任何改变DOM结构的操作都认为是新操作来重新生成测试用例会浪费相当的时间和人力。提出一种基于页面DOM相似度的Web应用单元测试方法。利用爬虫程序获取页面状态与相应的DOM结构;利用DOM相似度对DOM进行评价,并对DOM状态进行分类,利用分类簇的中心作为相应功能的操作结果,返回应用中寻找相应的代码块并且进行测试。实验结果表明:该方法可以有效地降低“单一DOM对应单一状态”模式中的冗余状态跳转,可以达到合理的功能发现率,同时有效降低冗余的待测试状态。

关 键 词:页面相似度  页面聚类  Web应用测试  

Page cluster based research on Web application test method
YOU Feng,ZHANG Yafeng,ZHAO Ruilian,MA Jinhui.Page cluster based research on Web application test method[J].Computer Engineering and Applications,2018,54(5):51-56.
Authors:YOU Feng  ZHANG Yafeng  ZHAO Ruilian  MA Jinhui
Affiliation:College of Information Science and Technology, Beijing University of Chemical Technology, Beijing 100029, China
Abstract:The existing Web testing technologies mostly start from the front end, by analyzing the page DOM structure to obtain the state and the state jump condition. But all the technologies treat any DOM node changes as a new formation DOM, if any operation that leads to the change of DOM is considered as a new operation and regenerates test cases, this is a waste of time and human force. In this paper, a Web application unit test method that is based on page DOM similarity is proposed. First it uses a crawl to get the page state and the corresponding DOM structure then uses Dom similarity to evaluate and classifies the DOM, finally uses the center of the cluster as corresponding operation’s result, and returns to the application to find the code block for testing. The experimental result shows that this method can effectively reduce the redundant state jumping in “single DOM to single state” mode, and it can achieve reasonable function discovery rate, effectively reduces the redundancies of the test state.
Keywords:page similarity  page cluster  Web application testing  
点击此处可从《计算机工程与应用》浏览原始摘要信息
点击此处可从《计算机工程与应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号