首页> 中文期刊> 《计算机工程与应用 》 >基于页面聚类的Web应用测试方法研究

基于页面聚类的Web应用测试方法研究

             

摘要

现有的Web测试是由前端出发,通过分析页面DOM结构来获取状态与状态跳转的条件.但现有技术是将任何DOM节点的改变都认定为产生了新的DOM树,如果对于任何改变DOM结构的操作都认为是新操作来重新生成测试用例会浪费相当的时间和人力.提出一种基于页面DOM相似度的Web应用单元测试方法.利用爬虫程序获取页面状态与相应的DOM结构;利用DOM相似度对DOM进行评价,并对DOM状态进行分类,利用分类簇的中心作为相应功能的操作结果,返回应用中寻找相应的代码块并且进行测试.实验结果表明:该方法可以有效地降低"单一DOM对应单一状态"模式中的冗余状态跳转,可以达到合理的功能发现率,同时有效降低冗余的待测试状态.%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.

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号