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

Data flow test case generating method

A test case generation and test case technology, applied in software testing/debugging, genetic models, etc., can solve problems such as less research on test case automatic generation algorithms, slow algorithm convergence, fitness function design, etc., and achieve strong practical significance , increase the convergence speed, and improve the effect of the fitness function

Inactive Publication Date: 2012-10-03
FUJIAN NORMAL UNIV
View PDF4 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] So far, experts and scholars at home and abroad have proposed various automatic test case generation algorithms, but the research on automatic test case generation algorithms based on data flow testing is less
Automatic test case generation algorithm for data flow (ATGAFDF for short) is one of them. The ATGAFDF algorithm mainly uses genetic algorithm to search for test cases that meet the data flow test criteria. However, the fitness function of the ATGAFDF algorithm The design is too simple, making the convergence of the algorithm slow

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0016] The method for generating data flow test cases of the present invention uses a genetic algorithm to search for test cases that meet the data flow test criteria. In the method, the degree of fitness is calculated by the following formula:

[0017]

[0018] Among them, fitness(t) represents fitness, m represents the number of paths covered by test case t, n represents the total number of paths that the program needs to cover, and p represents the branch predicates contained in the uncovered (n-m) paths Quantity, the branch predicate is the conditional expression of the program branch, α represents the influence weight factor of the branch predicate on the fitness, take 0.5, f i (x) represents the branch function value of the i-th branch of the program, and the construction method of the branch function is:

[0019] (1) If the branch predicate is A>B or A≥B, then the branch function is ;

[0020] (2) If the branch predicate is A ;

[0021] (3) If the branch predicat...

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 relates to a data flow test case generating method. Test cases meeting data flow test criteria are searched by a genetic algorithm. In the method, fitness is computed according to a following formula, wherein fitness (t) represents the fitness, m represents the number of paths covered by a test case t, n represents the number of total paths required to be covered in a program, p represents the quantity of branch predicates contained in (n-m) paths which are uncovered, the branch predicates are condition expressions of branches of the program, alpha represents an influence weight factor of the corresponding branch predicate to the fitness, and f(x) represents a branch function value of the i branch. The method is favorable for increasing convergence speed of the data flow test case generating algorithm.

Description

technical field [0001] The invention relates to a method for generating data flow test cases. Background technique [0002] An important feature of software testing is to design corresponding test cases according to the characteristics of the object to be tested. The design of test cases is the most important part of software testing, which plays an important guiding role in the later testing work and is also the fundamental guarantee of high-quality software. [0003] So far, experts and scholars at home and abroad have proposed various automatic test case generation algorithms, but the research on automatic test case generation algorithms based on data flow testing is less. Automatic test case generation algorithm for data flow (ATGAFDF for short) is one of them. The ATGAFDF algorithm mainly uses genetic algorithm to search for test cases that meet the data flow test criteria. However, the fitness function of the ATGAFDF algorithm The design is too simple, which makes th...

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/12
Inventor 许力陈江勇张辉陈志德孔祥增
Owner FUJIAN NORMAL UNIV
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