Font Size: a A A

Research On Automatic Generation Method Of Test Data For Multi-Path Coverage

Posted on:2022-05-10Degree:MasterType:Thesis
Country:ChinaCandidate:M ZhangFull Text:PDF
GTID:2518306563475414Subject:Software engineering
Abstract/Summary:PDF Full Text Request
The automatic generation of test data is to solve problem of error-prone,time-consuming and laborious manual testing.Common test method now is to select representative test data for testing.This selection rule is the coverage criterion.Path coverage is the strongest coverage criterion in software testing.In order to achieve path coverage,testers need to know the target path to be covered in advance.After randomly generating test data,it is necessary to determine whether the path which test data passes is the target path.The judgment method needs to measure the similarity between paths,and then iterate through intelligent algorithms to continuously optimize the test data until the target path is covered.This thesis focuses on the problem of automatic generation of test data.The main work is as follows:(1)Aiming at the difficulty in obtaining the target path set of the program under test,an algorithm for generating the target path set is proposed.In this algorithm,the program control flow graph is simplified by the loop structure de-looping method,and the basic path set is obtained by McCabe metric method;then,the method of determining the relevance of conditional sentences proposed in this thesis is used to dynamically run the program under test,get all the relevant sentences to detect the infeasible path;finally remove the infeasible path from the basic path set to generate the target path set.(2)Analyzing the factors that affect path similarity,a new single-path similarity measurement method is proposed.Simultaneously,in view of the inaccurate measurement problem of the existing multi-path measurement method,a new multi-path similarity measurement method is proposed.(3)An algorithm for automatic generation of test data for multi-path coverage is proposed.In this algorithm,intelligent algorithms need to be introduced to optimize test data.This thesis selects several programs under test of different scales and introduces a variety of intelligent algorithms to conduct comparative experiments.The experimental results show that,compared with the introduction of genetic algorithm and particle swarm algorithm,the introduction of beetle antennae search algorithm to optimize test data has better performance in terms of path coverage and time efficiency.
Keywords/Search Tags:Automatic generation of test data, Target path set, Infeasible path, Path coverage, Path similarity, Beetle antennae search algorithm
PDF Full Text Request
Related items