Font Size: a A A

An Improved Evolutionary Strategy For Multi-target Path Coverage Testing

Posted on:2020-08-26Degree:MasterType:Thesis
Country:ChinaCandidate:D F HongFull Text:PDF
GTID:2428330575990824Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Test data is the source of software test input.Reliable test data can quickly and effectively get the desired results;otherwise,it will result in inefficient testing and lead to vicious circle testing.Therefore,one of the key problems in software testing is how to design test data with high quality.Research on more efficient test methods is the key to obtain high-quality test data.Different subjects will adopt different testing methods.Generating test data for path coverage is a typical test method.Its object of study is the execution path of the program.According to the path,the test data satisfying the conditions can be generated.According to complexity,path coverage testing can be divided into single-target path coverage problem and multi-target path coverage problem;both of them are test methods for generating test data according to program path.Genetic algorithm is widely used in path coverage testing,and is often used to search test data satisfying conditions.In this paper,the genetic algorithm is adopted in the single target path coverage problem and the multi-target path coverage problem,and the corresponding test data generation method is proposed.Aiming at the problem that many path coverage methods are less concerned with the difficulty of execution of each sentence in the tested program,the concept of contact vector is proposed,which is combined with the layer proximity theory to introduce the contact layer proximity method.As part of designing the fitness function,the method accelerates the generation of test data and improves the efficiency of target path test data generation.An improved multi-target path coverage method for individual information sharing is proposed.This method changes the individual sharing strategy and constructs the fitness function using contact layer proximity.In the early stage of implementing multi-group genetic algorithm,according to the coverage effect of the population on the target path set,the method sorts the population,and the population with good coverage is executed first,and the population ranking strategy is formulated.It deals with the difficultly-covered paths for the inefficiencies that may be caused by the existence of difficultly-covered paths.The basic idea is to first calculate the relationship matrix of an existing individual that successfully covers the target path,then use this relationship matrix as the screening target of the subsequent genetic algorithm,until the individual whose relationship matrix meets the target matrix is found.The final experimental results show that the efficiency of test data generation is effectively improved.In this paper,the problem of multi-target path coverage is studied.In the proposed method,firstly,the strategy of individual information sharing is improved;secondly,the population is sorted in multi-population genetic algorithm;finally,a processing scheme is proposed to solve the problem of difficultly-covered paths,which effectively improves the efficiency of generating test data.
Keywords/Search Tags:Multi-target Path Coverage, Test Case, Test Data Generation, Genetic Algorithm, Individual Information Sharing
PDF Full Text Request
Related items