Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for automatically generating data flow test case based on particle swarm optimization algorithm

A technology of particle swarm algorithm and test case, which is applied in the fields of electrical digital data processing, software testing/debugging, calculation, etc., and can solve problems such as the inability to better guide the evolution of test cases and the difficulty of particle swarm algorithm to converge to the global optimum.

Pending Publication Date: 2021-09-10
SHANDONG UNIV OF SCI & TECH
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Other meta-heuristic algorithms such as particle swarm optimization are also gradually applied to the automatic generation of test cases based on data flow, but the current automatic generation of test cases based on data flow has the following problems: First, in the data flow test criteria, the The test case information contained in the fitness function used cannot better guide the evolution of test cases
Second, it is difficult for the particle swarm algorithm used in the data flow test to converge to the global optimum, and it is easy to fall into the local optimum

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
  • Method for automatically generating data flow test case based on particle swarm optimization algorithm
  • Method for automatically generating data flow test case based on particle swarm optimization algorithm
  • Method for automatically generating data flow test case based on particle swarm optimization algorithm

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0047] A verification experiment of the present invention, the present invention is below described in further detail in conjunction with accompanying drawings and specific embodiments:

[0048] like figure 1 , The method of automatically generating test data stream based on particle swarm, firstly PSO improvements, including the design of new fitness function according to the distance from the branch, to adjust the update rate of particle inertia weight factor, and to provide a chaotic perturbation strategy; then automatically generate improved particle swarm test set data stream.

[0049] Specifically, the following steps:

[0050] Step 1: obtaining the program under test P, P to parse the corresponding control flow graph constructed of CFG (P), and the set of variables obtained P N.

[0051] Step 2: The method of depth-first traversal traversal CFG (P), to obtain all paths Path (P) program.

[0052] Step 3: Since the bottom up to each of the executable paths, according to N get...

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 method for automatically generating a data flow test case based on a particle swarm optimization algorithm, which belongs to the field of software testing, and comprises the following steps of: firstly, improving the particle swarm optimization algorithm, namely designing a fitness function according to a branch distance, adjusting and updating an inertia weight factor of a particle speed, and simultaneously providing a chaos disturbance strategy; automatically generating a test case set based on data flow based on an improved particle swarm algorithm; the method specifically comprises the following steps of: obtaining a tested program, and performing data flow analysis on the tested program so as to obtain all definition-use pairs in the program; performing initialization by using a random algorithm in the improved particle swarm optimization; obtaining a fitness function according to a branch distance method; and generating a test case covering all definition-use pairs by using an improved particle swarm algorithm. According to the method, the improved particle swarm algorithm is applied to automatic generation of the test case oriented to the data flow, so that the generation efficiency and the coverage rate of the test case are improved, and the software testing efficiency is further improved.

Description

Technical field [0001] The present invention belongs to the field of software testing, and in particular to a data stream test case for a particle group algorithm based on automatic generation method. Background technique [0002] One of the difficulties of software testing automation is to perform automatic generation of test cases under the premise of meeting a certain coverage criterion. The test overlay is important as the important basis for judging testing. The main is: based on control flow test coverage criteria and data stream test Coverage guidelines. However, due to the control flow-based criteria, it is easy to miss the status-oriented state-oriented state dependencies, and the data stream can be obtained well, so the data stream-based test is a new research hotspot. [0003] In recent years, the use of the method of automatically generating the test case of the dollar heuristic algorithm with the data flow ratio, and this method has also improved significantly in imp...

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/36G06N3/00
CPCG06F11/3684G06N3/006
Inventor 赵卫东韩苏苏
Owner SHANDONG UNIV OF SCI & TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products