In many fields,with the rapid populization of Web applications,its stability and reliability are becoming more and more important.Software testing is an important step to ensure software quality.In consideration of the specificity of modern Web application and Web pages,a test case designed for a single Web application may become uselesss because of a little change of the back-end code.Existing Web test method are starting from the front page,by analyzing the page's DOM structure to obtain state and state transition conditions.But because of the part refresh characteristics of AJAX technology,single DOM node's change will be identified as a new DOM tree,and if every changes of AJAX's part refresh operation is believed as a new operation and thus generating tese case for it,this will cost massive time and human resources.In this paper,based on the previous Web testing technology and information extracting technology that using DOM similarity evaluation method,we proposed a new Web application testing method based on page similarity.First use the DOM similarity evaluation method to evaluate the page station,then use the similarity value for clustering operations,after clustering get center page as operation's result to conduct the unit test,and combine the front-to-next jump relation to complete the system test.Taking into account that the DOM structure is a tree structure with node content,first we transform it into a sequence format that is convenient to compare and retain its content.By comparing different pages,the results show that the DOM similarity evaluation method can effectively identify the similar pages while retaining the information contained in the DOM structure.This test method can effectively reduce the redundant state jump in single DOM to single state mode.At the same time,BUG can be quickly located at the appropriate code block.The experimental results show that the proposed method can achieve a reasonable rate of function discovery and coverage,at the same time,it can effectively reduce the redundant state to be tested. |