Font Size: a A A

Test Data Generation For Mutation Testing Based On Important Statement Selection

Posted on:2017-05-08Degree:MasterType:Thesis
Country:ChinaCandidate:B QinFull Text:PDF
GTID:2308330509955010Subject:Control Science and Engineering
Abstract/Summary:PDF Full Text Request
Software testing is designed to reveal vulnerabilities or risks that exist in software, so as to ensure its safety and reliability. Generating effective test data is the core of software testing. Mutation testing is a defect-oriented testing technique which implants artificial defects to simulate vulnerabilities in practical applications. Therefore, mutation testing is used for detecting the validity of test data. However, expensive cost with a large number of mutants limits its feasibility and applications. Thus, it is necessary to research the theory and method so as to reduce the cost of mutation testing. There are 3 aspects for mutation testing in this thesis, i.e., object selection, test data generation, and method implementation.First, based on statement importance, a novel method of selecting mutation objects is proposed in this paper to reduce mutants. Statements with high importance are selected as the objects that will be mutated. Therefore, three factors that reflect the importance of test object are proposed according to the composition of the original statement. An index system of evaluating the importance of test object is established based on these factors, and a method of selecting mutation objects is proposed. This method only needs to choose some objects to be mutated. It significantly reduces the number of mutants so as to improve the efficiency of mutation testing.Second, branch coverage preference strategy based on important statements and a method of generating test data based on the genetic algorithm are proposed. According to the index system of evaluating the importance of test object, this method calculates important degree of each statement, and ranks all statements in descending order. After that, it determines the coverage order of mutation branches, and uses genetic algorithm to generate test data. The proposed method significantly reduces the execution cost of mutation testing with a high mutation sufficiency.Finally, based on the above research result, an implementation process is given for generating test data of mutation testing. This process can be divided into three stages, i.e., program processing, evolutionary solving, and results processing and used for mainly includes analysis and pretreatment before executing the application, various genetic operators of the evolution process, and preserving the output of experimental results and related data respectively.The research work in this thesis can enrich theory and method of mutation testing, and expand the application range of genetic algorithms, thus having important theoretical and practical values.
Keywords/Search Tags:mutation testing, test object selection, statement importance, test data generation, genetic algorithm
PDF Full Text Request
Related items