Data flow-oriented test case generation method

A test case generation and test case technology, applied in software testing/debugging, electrical digital data processing, genetic laws, etc., can solve problems such as multiple time, resources, consumption, etc., to optimize the generation method process and reduce program instrumentation. the effect of the number of times

Active Publication Date: 2019-10-25
HOHAI UNIV
View PDF4 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In most methods, the value of the fitness function needs to be calculated by running the plug-in program. For large-scale and complex software, this process needs to consume more time and resources.

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
  • Data flow-oriented test case generation method
  • Data flow-oriented test case generation method
  • Data flow-oriented test case generation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] like figure 1 As shown, a test case generation method oriented to the data flow criterion, including the following steps:

[0032] (1) Perform data flow analysis on the program to be tested to obtain all definition-use pairs in the program;

[0033] (2) Design and train the BP neural network to simulate the fitness function;

[0034] (3) Genetic algorithm is used to generate test cases covering all definition-use pairs.

[0035] In step (1), the specific steps for calculating all definition-use pairs in the program are:

[0036] (11) Use the open source tool SOOT to analyze the program to be tested and construct the corresponding control flow graph CFG, where each node represents an atomic operation, and assign a unique number to each node in the CFG for subsequent analysis;

[0037] (12) Data flow analysis based on CFG. like figure 2 As shown, the depth-first traversal method is used to traverse the program CFG to obtain all the paths of the program. First defin...

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 discloses a data flow-oriented test case generation method, which comprises the following steps of (1) performing data flow analysis on a program to be tested to obtain all definitions in the program; a usage pair; (2) designing and training a BP neural network to simulate a fitness function; and (3) generating a test case covering all definition-use pairs by using a genetic algorithm. The method has the beneficial effects that the test case is generated for the all-uses data flow criterion and is used for solving the test problem of the Java program; compared with a traditionalmethod, the neural network is used for simulating calculation of the fitness function, and the program instrumentation operation frequency in the genetic algorithm can be reduced; through the design of the neural network structure, the flow of the test case generation method based on the neural network is optimized, and the flow does not need to be executed for multiple times for multiple to-be-tested targets.

Description

technical field [0001] The invention relates to the technical field of software testing, in particular to a data flow-oriented test case generation method. Background technique [0002] With the continuous improvement of software development technology, the application of software products is becoming more and more extensive, its scale and complexity are gradually increasing, and quality assurance is also facing more and more challenges. In the software quality assurance system, testing is an effective technique, and good testing can find as many software defects as possible. [0003] The design of test cases is the core work of software testing, which is generally carried out according to certain testing guidelines according to testing requirements. Many studies design test cases based on the path coverage (all-paths) criterion, and find errors by checking all execution paths in the software. For software containing loop structures, in the test case generation based on the...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36G06K9/62G06N3/04G06N3/12
CPCG06F11/3684G06N3/04G06N3/126G06F18/214
Inventor 吉顺慧陈琴张鹏程马魏
Owner HOHAI UNIV
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