Test data automatic generation method based on independent path

A technology for automatically generating and testing data, applied in electrical digital data processing, software testing/debugging, error detection/correction, etc., to avoid path coverage and reduce costs

Active Publication Date: 2019-11-01
XIAN UNIV OF POSTS & TELECOMM
View PDF6 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The main problem to be solved by the present invention is to provide a method for automatically generating software test cases based on independent path coverage for the deficiencies in the generation of test cases in the existing software testing technology field

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
  • Test data automatic generation method based on independent path
  • Test data automatic generation method based on independent path
  • Test data automatic generation method based on independent path

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0041] The embodiments of the present invention will be further described below in conjunction with the examples, but the implementation of the present invention is not limited thereto. In the following description, the parts that are not specifically described in detail are the parts that can be understood and implemented by those of ordinary skill with reference to the prior art, such as the general execution steps of the bacterial foraging algorithm.

[0042] Such as figure 1 , a method for automatically generating test data based on an independent path includes the following steps:

[0043] (1) Obtain the control flow graph of the program median.

[0044] Using the open source software Soot code analysis tool, for figure 2 The example code shown in Median, generates a image 3 The control flow graph CFG is shown and simplified for analysis. The result obtained is as Figure 4 , the serial numbers of the circles in the figure are figure 2 The line number correspondi...

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 test data automatic generation method based on an independent path in order to solve the problem of test case generation in software testing. The method comprises the following steps: firstly, carrying out static analysis on a tested program to obtain a control flow diagram of the tested program, and exporting all independent paths through loop complexity; secondly, encoding specific problems of the tested program to obtain an input range and a path code; then, according to a path analysis and branch distance calculation method, performing instrumentation on the testedprogram to obtain a fitness function; generating uniformly distributed initial populations through a chaotic sequence, and selecting the initial population with a high fitness function value as the initial population of the bacterial foraging algorithm; and finally, carrying out iterative updating by utilizing the improved bacterial foraging algorithm and the fitness function until the test casesof all the independent paths are solved or the maximum number of iterations is reached, and recording and outputting the test cases covering the independent paths. According to the method, on the premise that effective coverage is guaranteed, the test cases can be rapidly obtained with few test cases.

Description

technical field [0001] The invention belongs to the technical field of software testing, in particular to an automatic generation method of software testing cases based on independent path coverage. Background technique [0002] With the rapid development of computer science, computer software has become an important part of the field of computer science in people's daily life and has become an irreplaceable role. But software is developed by people, and software is a complicated system, it is impossible to guarantee that software is completely reliable and error-free, and some errors are likely to cause waste and loss of human, financial and material resources, which makes people realize the necessity of software testing . Software testing is an essential part of the entire process of software development and an important means to ensure software reliability. Traditional software testing methods are basically done manually, and human errors may occur, which will affect 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/36
CPCG06F11/3684G06F11/3688Y02D10/00
Inventor 王曙燕王瑞孙家泽
Owner XIAN UNIV OF POSTS & TELECOMM
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