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.

Active Publication Date: 2019-12-06
SOUTH CHINA UNIV OF TECH
View PDF5 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Most dynamic testing methods are based on statement coverage or branch coverage

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 automatic execution method based on test case automatic generation algorithm
  • Unit test automatic execution method based on test case automatic generation algorithm
  • Unit test automatic execution method based on test case automatic generation algorithm

Examples

Experimental program
Comparison scheme
Effect test

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....

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 automatic execution method based on a test case automatic generation algorithm. The method comprises the following steps of: preprocessing codes of a tested program,performing lexical analysis, establishing a path diagram for generating test codes, outputting a control flow diagram to a file, inserting fixed-point codes into the preprocessed codes, and compilingthe file into which the codes are inserted; and then generating a test case according to a test case automatic generation algorithm, calling a user code, traversing each code block of the user code,calculating an algorithm adaptation value of the fit, obtaining the fit adaptation value, generating a path corresponding to the test case, and exiting when judging whether the path is fully covered or the operation is overtime. The method is suitable for unit testing in the software development process, a test case can be automatically generated through a computer program for code testing, a testreport can be automatically generated, and the human resource cost and the time cost are greatly reduced.

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...

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/3688
Inventor 黄翰连木明朱浩锋植浩聪谌小虎刘方青杨忠明汪疆平
Owner SOUTH CHINA UNIV OF TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products