Font Size: a A A

Research Of Test Case Generation Technology Based On Adaptive Genetic Algorithm

Posted on:2019-01-21Degree:MasterType:Thesis
Country:ChinaCandidate:Z J XiongFull Text:PDF
GTID:2348330542973626Subject:Signal and Information Processing
Abstract/Summary:PDF Full Text Request
One of the key points of software testing automation technologies is automatic generation of test cases.The use of heuristic search algorithms to generate software test cases has been proved to be an effective method,and genetic algorithms(GAs)are the most widely used among them.However,as a kind of search algorithm based on natural selection,GAs has the defect of premature convergence and low search efficiency in later phases of the search process.The traditional genetic algorithm uses standard genetic operators that the crossover rate and mutation rate are fixed,which is bad for searching the global optimum due to a sharp reduction in population diversity.Moreover,the traditional method to generate path-oriented test cases based on GAs is not reasonable enough in designing evaluating function that it does not take structural difference of target path into consideration,which hinders the improvement of efficiency of test cases generation.To address the above issues,this paper proposes a method for test cases generation based on adaptive genetic algorithm.The main research work of this paper is summarized as follows:(1)In order to maintain population diversity and alleviate the problem of premature convergence,this paper proposes a method using adaptive crossover operator and mutation operator for optimizing searching ability by using hamming distance and fitness values of test data calculating population diversity.(2)On the basis of analyzing genetic algorithm and software testing technology,the framework of automatic generation of test cases based on adaptive genetic algorithm is presented to meet branch coverage,which is an effective solution for test case generation.(3)Considered of this specific issue of path-oriented test cases generation,a new fitness function is proposed to evaluate individuals according to the structure analysis,which combines approach level and branch distance and takes the nesting degree of branches into consideration to compute the fitness values of test data so as to improve the efficiency.Respectively in order to verify the validity of the proposed methods,a series of benchmark experiments were presented in this paper,the experimental results show that the adaptive genetic algorithm proposed in this paper is better than the original algorithm that it can reach higher branch coverage and improve convergence speed for the test case generation problem of branch coverage as the size of test cases suite is maintained.For the test case generation problem of covering target path,the improved method in this paper can reduce the expenditure of time and evolution generation,and has a higher success rate of path coverage when compared to the traditional method.
Keywords/Search Tags:Software testing, Automatic generation of test cases, Genetic algorithm, Adaptive adjustment
PDF Full Text Request
Related items