Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Unit test method which is automatically generated based on a path coverage test case

A path coverage test and automatic generation technology, which is applied in software testing/debugging, error detection/correction, instruments, etc., to achieve strong usability, wide application space, and improve test efficiency

Active Publication Date: 2018-10-26
SOUTH CHINA UNIV OF TECH +1
View PDF6 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

And although there is a method for automatically generating test cases, there is no complete software automation test intelligent method that can automatically analyze the source code, substitute test cases for testing, and generate test reports at the same time

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Unit test method which is automatically generated based on a path coverage test case
  • Unit test method which is automatically generated based on a path coverage test case
  • Unit test method which is automatically generated based on a path coverage test case

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0032] The embodiment of the present invention will be further described below in conjunction with the examples, but the implementation of the present invention is not limited thereto. understand.

[0033] Such as figure 1 , the unit test method automatically generated based on the path coverage test case includes the following steps:

[0034]The first step is to input the source program to be tested, preprocess the source program file, analyze and compile the source code to generate a control flow graph (CFG); analyze each input, output, judgment, and loop branch, and use these Based on the information, draw the control flow graph (CFG) of the tested functional unit, such as image 3 shown. According to the judgment node in the control flow diagram, the path encoding table and node encoding table are generated to determine the dimension of the test case. After the control flow graph is obtained, the number of paths existing in the program under test is obtained according ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a unit test method which is automatically generated based on a path coverage test case. Firstly, a lexical analysis and a syntax analysis are carried out on a code of a programto be tested, and then a control flow diagram of the program is obtained. After obtaining the control flow graph, the node table is generated according to the known number of nodes. Based on the automatically generated test cases, the execution of executable codes in the nodes is driven in the generated control flow diagram, at the same time, according to the execution result of executable codes,the fitness value is calculated and obtained, and the child nodes are selected to continue to repeat the process until the termination node in the graph is found, and finally, the path marker and thefitness value corresponding to the path marker are generated. Then the automatic test case generation algorithm is run, which automatically generates test cases according to the fitness value returneduntil the path is completely covered or exits when the set run time expires. The invention is suitable for software testing, and can be applied to actual software testing working environment throughexperimental verification.

Description

technical field [0001] The invention relates to the field of software testing of computer software engineering, in particular to an integrated method for unit testing automatically generated based on path coverage test cases. Background technique [0002] With the continuous development of the software industry, software testing is becoming more and more important in software development, because traditional software testing basically generates test cases manually, and then tests the software, which is an extremely complex and tedious manual labor. , is not only costly and error-prone, but also there are a lot of low-tech and highly repetitive tasks in the process of software testing, so designing a software automatic testing intelligent software can effectively reduce the testing labor cost of the enterprise, and at the same time improve the test report Analysis can effectively guarantee test efficiency and effect and control test cost. An excellent automated testing softw...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/36
CPCG06F11/3684G06F11/3676G06F11/3688G06F11/3692
Inventor 黄翰连木明刘方青杨忠明郝志峰
Owner SOUTH CHINA UNIV OF TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products