Web application test case generation method based on user interface state flow graph

A test case generation, user interface technology, applied in software testing/debugging, error detection/correction, instrumentation, etc., can solve the problems of low test efficiency, repeated search of the same sub-path, high cost of web application testing, and reduce the scale , the effect of reducing the cost of testing

CN108459967BActive Publication Date: 2021-04-06SOUTHEAST UNIV
6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Publication Date
2021-04-06

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a method for generating a Web application test case based on a user interface state flow graph. First, a dynamic search technology is used to generate a user interface state flow graph as a Web application test model, and then the SFG graph is traversed in reverse and depth-first starting from the final state node to obtain The sequence of events on the complete path from the initial state to the final state node, on this basis generate Web application test cases; when traversing the SFG in reverse, mark the visited nodes, and use the initial node to these visited nodes in the subsequent test case generation process Shortest path replacement of marked nodes for deep traversal. The invention can reduce the scale of the test case set, reduce the cost of the Web application test and improve the efficiency of the Web application test under the premise of ensuring the edge coverage of the SFG graph.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention belongs to the field of software analysis and testing in software engineering, and in particular relates to a method for generating Web application test cases based on user interface state flow diagrams. Background technique

[0002] With the popularization of network technology and the continuous increase of practical application requirements, the development and use of Web applications are becoming more and more extensive. The ensuing quality problems of Web applications have an important impact on people's production and life, especially in e-commerce, information management and other application fields, sometimes the quality problems of Web applications will bring immeasurable losses to people. Web application testing is an important means of software quality assurance, and how to effectively generate test cases for web applications is a key technology in the research of web application testing. According to different ways of generat...

Examples

Embodiment

[0041] In this embodiment, a depth-first dynamic search technique is used to generate a user interface state flow graph (SFG) as a Web application test model, and a test case is generated by reversely traversing the SFG graph. A complete path in the SFG graph corresponds to a test case of the Web application. The implementation steps are as follows:

[0042] 1. Generate SFG diagram

[0043] 1) Initially load the entry address of the web application to generate the initial state index of SFG;

[0044] 2) Analyze the DOM elements related to the clickable event in the index object, and extract the clickable event set{e 1 ,e 5}, select one of the unclicked events e 1 , simulating its triggering, generating a new state s 1 , update the SFG graph;

[0045] 3) Use the depth-first strategy to dynamically search for new states, update the SFG graph, and backtrack until there are no clickable events in the current state. as from s 1 Departure choose e 2 Simulate trigger, generat...