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
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Publication Date
- 2021-04-06
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
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...