Unit test automatic execution method based on test case automatic generation algorithm
A test case, automatically generated technology, applied in software testing/debugging, computing, error detection/correction, etc.
Patent Information
- Authority / Receiving Office
- CN · China
- Current Assignee / Owner
- Publication Date
- 2019-12-06
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
technical field
[0001] The invention relates to the field of software testing of computer software engineering, in particular to an integrated method based on path coverage test case automatic generation algorithm and unit test automatic execution. Background technique
[0002] With the explosive growth of the number of software applications and the continuous development of the software industry, high-quality software has become a common demand of the industry and users, and high-quality software is always inseparable from a large number of tests. The IEEE Computer Society gave a clear definition of software testing in IEEE Std829-1983: the quality of software is measured by means of manual testing or automatic testing, and it is used to check whether the actual running results of the tested software are consistent with those when the software was designed. unanimous. Because the traditional method of testing software under test by manually generating test cases requires a...
Examples
Embodiment 1
[0105] In this embodiment, the unit test automatic execution method based on the test case automatic generation algorithm comprises the following steps:
[0106] The first step is to input the source program to be tested, such as figure 2 As shown, perform file preprocessing
[0107] In the second step, the unit test automatic execution method based on the test case automatic generation algorithm conducts a global lexical analysis on the source program and establishes a path diagram for generating test codes, such as image 3 shown.
[0108] The third step is to insert the analysis code, convert the code in the judgment statement and insert the relevant global code. After inserting the code, the code file structure is as follows (the following code is for reference only):
[0109]
[0110]
[0111]
[0112]
[0113]
[0114]
[0115] The fourth step is to call the existing g++ and gcc environment to compile and execute the file after the code is inserted....