Invention Grant
- Patent Title: Unit testing method based on automatic generation of path coverage test cases
-
Application No.: US17058110Application Date: 2018-10-31
-
Publication No.: US11720477B2Publication Date: 2023-08-08
- Inventor: Han Huang , Muming Lian , Fangqing Liu , Zhongming Yang , Zhifeng Hao
- Applicant: SOUTH CHINA UNIVERSITY OF TECHNOLOGY
- Applicant Address: CN Guangdong
- Assignee: SOUTH CHINA UNIVERSITY OF TECHNOLOGY
- Current Assignee: SOUTH CHINA UNIVERSITY OF TECHNOLOGY
- Current Assignee Address: CN Guangdong
- Agency: JCIPRNET
- Priority: CN 1810501975.0 2018.05.23
- International Application: PCT/CN2018/113236 2018.10.31
- International Announcement: WO2019/223247A 2019.11.28
- Date entered country: 2020-11-23
- Main IPC: G06F11/36
- IPC: G06F11/36

Abstract:
The present invention provides a unit testing method based on automatic generation of path coverage test cases. First, obtain a control flow graph of a program to be tested is obtained. Then, an executable code is executed in the generated control flow graph based on of an automatically generated test case, and meanwhile, a fitness value is calculated and acquired based on of an execution result of the executable code, and a sub-node is selected to continue repeating the above process, until a terminal node in the control flow graph is found, and finally a path marker is generated and the fitness value corresponding to the path is obtained. Then, an automatic test case generation algorithm is executed, and the algorithm constantly automatically generates test cases based on of the returned fitness value, and exits when the path is completely covered, or a set execution is timed out.
Public/Granted literature
- US20210209008A1 UNIT TESTING METHOD BASED ON AUTOMATIC GENERATION OF PATH COVERAGE TEST CASES Public/Granted day:2021-07-08
Information query