Font Size: a A A

Research On Method Of Reducing Consumption In Mutation Testing Based On Clustering And Estimation Of Distribution Algorithm

Posted on:2021-04-03Degree:MasterType:Thesis
Country:ChinaCandidate:C Q WeiFull Text:PDF
GTID:2428330629951341Subject:Applied Mathematics
Abstract/Summary:PDF Full Text Request
As an important software testing technique,mutation testing can be used not only to construct a complete set of test cases to reveal software defects,but also to measure the ability of test cases to uncover errors and to evaluate the effectiveness of test suite.However,a large number of generated mutants and the high redundancy of test cases in mutation testing makes the consumption of mutation testing huge.With the continuous expansion of software scale,this problem becomes particularly prominent.Therefore,it is more urgent to find a more effective way to solve the current problem of high consumption.In view of this,this paper intends to improve the efficiency of mutation testing and reduce the consumption of mutation testing from the two aspects,i.e.mutant reduction and test case generation.In order to effectively reduce the number of mutants,this paper proposes a mutant reduction method based on improved spectral clustering algorithm.Firstly,using the killing matrix to give the formula of the distance between the mutants.Then,it makes full use of the improved spectral clustering algorithm to cluster the mutants.Finally,a mutant is randomly selected as a representative individual in each class to form a reduced set of mutants.The proposed method can significantly reduce the number of mutants without jeopardizing the performance of mutation testing.To efficiently generate test cases that kill mutants,this paper proposes a method based on extended path coverage for test data generation in weak mutation testing.Firstly,using the transformation rules of weak mutation testing to obtain mutant branches,and the extended control flow chart is constructed according to four rules.Then,the Markov chain usage model is obtained by attaching the transition probability to each side according to the extended control flow chart.Next,the extended path is automatically generated based on the Markov chain usage model,and the test case generation problem is transformed into the extended path coverage problem.Finally,the distribution estimation algorithm is used to search the test cases on mutation testing,and the probability model is used to optimize the population in the search process to increase the search space,reduce the number of iterations,and improve the efficiency of generating test cases.Finally,these two methods proposed in this paper are tested on the actual benchmark programs.The results show that the proposed method can not only significantly reduce the number of mutants without jeopardizing the performance of mutation testing,but also improve the quality of test cases and the efficiency of test cases generation in mutation testing without jeopardizing the adequacy of the test suite.There are 17 figures,14 tables and 112 references in this paper.
Keywords/Search Tags:Mutation testing, Mutant reduction, Spectral clustering algorithm, Markov chain usage model, Test case generation
PDF Full Text Request
Related items