Automatic test case generation method based on double-chaos whale optimization algorithm

A technology for automatic generation and test cases, applied in software testing/debugging, computing, computing models, etc., can solve problems such as meta-heuristic algorithms falling into local optimal solutions, so as to improve generation efficiency, increase convergence speed, and evenly distribute particles Effect

Active Publication Date: 2020-05-29
SHANDONG UNIV OF SCI & TECH
View PDF5 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The purpose of the present invention is to aim at the above-mentioned deficiency that existing meta-heuristic algorithm exists, proposes a kind of test case automatic generatio...

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
  • Automatic test case generation method based on double-chaos whale optimization algorithm
  • Automatic test case generation method based on double-chaos whale optimization algorithm
  • Automatic test case generation method based on double-chaos whale optimization algorithm

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] Below in conjunction with accompanying drawing and specific embodiment the present invention is described in further detail:

[0037] The experiment selected as figure 1 The triangle classification program shown as an example verifies that figure 2 The entire process of automatic generation of test cases shown includes the following steps:

[0038] Experimental environment configuration: windows10 operating system, matlabR2018b, C language, lcov1.13.

[0039] Input: population size NP, maximum number of iterations Maxgen, population dimension k, initial population position S={S i |i=1, 2, . . . NP}.

[0040] Output: test case set A.

[0041] Step 1: Obtain the program under test, the number of input parameters of the triangle classification program k=3, respectively (a, b, c), and convert the program under test into image 3 The control flow shown.

[0042] Step 2: Program instrumentation refers to using the gcc compiler to perform instrumentation and compilation...

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 an automatic test case generation method based on a double-chaos whale optimization algorithm, which belongs to the field of computer testing, and specifically comprises the following steps of: obtaining a tested program, obtaining the number of input parameters, analyzing the tested program, converting the tested program into a control flow diagram, and performing programinstrumentation; calculating a test path set of a tested program according to the control flow diagram, and using a chaotic sequence to replace a random algorithm in a whale algorithm to initialize apopulation; obtaining a fitness function according to a layer approach method and a branch distance method; for each test path, optimizing the population to obtain an optimal value, performing chaoticdisturbance operation to obtain a new initialized population, performing whale optimization algorithm again, and performing repeated iteration to obtain a group of test cases; and repeating the stepsto obtain a complete test case set. According to the method, the whale optimization algorithm is applied to test case generation, and the chaotic strategy is used twice for the algorithm, so that thetest case generation efficiency is improved.

Description

technical field [0001] The invention belongs to the field of computer testing, and in particular relates to a method for automatically generating test cases based on a double-chaos whale optimization algorithm. Background technique [0002] Software testing based on path coverage is a commonly used software testing method, and the automatic generation of test cases plays a key role in improving the efficiency of software testing. In recent years, researchers at home and abroad have continuously combined the automatic generation of test cases with various meta-heuristic optimization algorithms, which has greatly improved the time and quality of test case generation. Genetic algorithm and particle swarm algorithm are commonly used now, such as the automatic generation method of test cases based on output domain proposed by You Feng et al., and the method of particle swarm optimization test case generation method based on pattern combination proposed by Jiang Shujuan et al. Ge...

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/3684G06F11/3688G06N3/006Y02T10/40
Inventor 赵卫东王静王铭刘昊
Owner SHANDONG UNIV OF SCI & TECH
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