Genetic algorithm optimization-based software test data generation method

A test data, genetic algorithm technology, applied in software testing/debugging, electrical digital data processing, computing, etc., can solve problems such as premature stagnation, failure to protect test data, and impact on efficiency

Active Publication Date: 2018-09-07
HANGZHOU HUICUI INTELLIGENT TECH CO LTD
View PDF7 Cites 27 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, some inherent defects of genetic algorithm, such as premature stagnation, easy to fall into local optimum, low search efficiency in the later stage, etc., affect the efficiency of test generation
Moreover, the existing fitness value function design methods do not effectively use the comprehensive information reflected by the evolutionary population, and thus do not protect the generated test data well during the evolution process.

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
  • Genetic algorithm optimization-based software test data generation method
  • Genetic algorithm optimization-based software test data generation method
  • Genetic algorithm optimization-based software test data generation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0018] The present invention will be further described below in conjunction with the accompanying drawings and through specific embodiments.

[0019] figure 1 is the Z-path coverage thought transformation diagram

[0020] Such as figure 1 as shown, figure 1 The left part is the control flow graph, and the right part is the graph transformed by Z-path coverage. Z path coverage refers to the loop in the program, regardless of the form of the loop and the number of times the loop body is actually executed, it only needs to be executed 0 times and 1 time, that is, only enter the loop body once and skip the loop body during execution. case, Z-path coverage is a path coverage in the sense of a simplified cycle. For example, nodes 1, 3, and 5 in the figure are branch nodes, and nodes 2, 4, and 6 are branch child nodes. After the transformation of the Z-path coverage idea, the original 2-branch child node in the left figure is also the a-branch child node in the right figure , a ...

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 genetic algorithm optimization-based software test data generation method, and belongs to the field of software testing. The method comprises the steps of performing static analysis on a current tested program to obtain a branch path coverage matrix; by considering the influence of layer proximity, branch distances and branch weights, designing a proper fitness function;in combination with an elite thought, improving a direction and a probability in a genetic operator of a genetic algorithm; selecting an initial population; replacing part of the initial population with a population comprising heuristic information and obtained by the coverage matrix; equally dividing the population; performing parallel genetic algorithm operation by using the improved fitness function and genetic operator; and selecting out optimal software test data meeting the conditions. The convergence speed of the genetic algorithm is increased while the algorithm is prevented from falling into local optimum, and the time cost of software test data generation is reduced.

Description

technical field [0001] The invention belongs to the field of software testing, in particular to a method for generating software testing data based on genetic algorithm optimization. Background technique [0002] Software testing is a vital link in software system development to ensure software quality, and a large proportion of software development costs is spent on testing. If the testing process can be automated, it will greatly reduce the cost of software development and improve testing efficiency. The generation of test cases includes determining test requirements, determining input data, running the program under test and analyzing the corresponding output data. The design of automatic test case generation technology is an important problem in software automation testing. Solving this problem is very important to ensure software quality, and it is the guarantee to improve software quality and reliability. [0003] As a heuristic search algorithm, genetic algorithm ha...

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/36G06N3/00
CPCG06F11/3684G06N3/006
Inventor 包晓安徐海霞张娜
Owner HANGZHOU HUICUI INTELLIGENT TECH CO LTD
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