Software test case automatic generation method based on clustering and evolutionary algorithm

A software testing and evolutionary algorithm technology, applied in software testing/debugging, computer components, computing, etc., can solve problems such as low efficiency, premature convergence of evolutionary algorithms, and inability to guarantee population diversity, so as to improve efficiency and optimize diversity. , Improve the efficiency of software testing

Active Publication Date: 2022-02-18
SOUTH CHINA UNIV OF TECH
View PDF4 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, existing methods also have defects. For example, artificially generated test cases often require high cost and low efficiency; when using a heuristic search algorithm as a generation strategy, traditional evolutionary algorithms tend to converge prematurely, which cannot be guaranteed. For the problem of population diversity, it is necessary to balance the global search and local search capabilities of the algorithm; because the existing methods often only use coverage to generate test sample data, and calculate the fitness value for individual evaluation, resulting in a lack of correlation between samples. Similarity or Correlation Mining

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
  • Software test case automatic generation method based on clustering and evolutionary algorithm
  • Software test case automatic generation method based on clustering and evolutionary algorithm
  • Software test case automatic generation method based on clustering and evolutionary algorithm

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0053] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Apparently, the described embodiments are only some of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of this application.

[0054] Reference in this application to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate...

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 software test case automatic generation method based on a clustering and evolutionary algorithm, wherein the method comprises the steps: analyzing a to-be-tested program, and constructing a control flow diagram, a coding path and an initialized access matrix of the program; initializing population and algorithm parameters; performing k-medoids clustering on the individuals of the population; performing inter-cluster and intra-cluster variation and crossover operation; recording access information of the individuals of the population one by one; calculating an access matrix cost function according to the access matrix, converting population individual parameters into binary systems, and calculating Hamming distances among the individuals of the population and an overall fitness function; updating the mutation operator of each individual in the population, performing selection operation, and enabling the selected new individuals to form the next generation; detecting whether all the paths are completely covered or reach the set maximum cycle number, and if all the paths are not completely covered or reach the set maximum cycle number, returning to repeat the execution; and if all the paths are completely covered or reach the set maximum cycle number, outputting a test case set covering each path of the to-be-tested program. According to the invention, automatic generation of the test sample is realized, and the software test efficiency is improved.

Description

technical field [0001] The invention belongs to the field of software testing, in particular to a method for automatically generating software testing cases based on clustering and evolutionary algorithms. Background technique [0002] With the development of testing technology, the types and methods of testing are gradually increasing, and the testing efficiency is also gradually improving. According to the differences within the program, software testing methods can be classified into black-box testing and white-box testing. According to the way of generating test cases, it can be divided into manual testing and automated testing. The automatic generation of software test cases can effectively reduce the cost of human and material resources in software testing. Software testing is an important means to ensure software quality, and the coverage and efficiency of test case design are particularly important. Among them, the test case coverage standard is mainly divided int...

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/36G06K9/62G06N3/00
CPCG06F11/3684G06N3/006G06F18/23Y02D10/00
Inventor 陈健邓钦艺
Owner SOUTH CHINA UNIV OF 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