Font Size: a A A

Automatic Software Test Cases Generation Problem Solving Based On Improved Differential Evolution Algorithm

Posted on:2017-01-29Degree:MasterType:Thesis
Country:ChinaCandidate:X Y ZhuoFull Text:PDF
GTID:2308330503968491Subject:Software engineering
Abstract/Summary:PDF Full Text Request
In order to ensure the quality of software products, it is necessary to test them. To gain the software of zero-defect quality, infinite software test cases must be generated, which is impossible in the real world. So an optimisation method is needed in the testing process to generate the test cases automatically for reducing the amount of resources without compromising quality. In all software test case generating way which is based on coverage, path coverage can detect faults in the software more comprehensively due to its stronger error correcting capability, therefore attracted much attention. The automatic software test case generation problem which is based on path coverage has a large number of research results, most of them are about of swarm intelligence algorithm, but there are still many problems to be solved, such as how to optimize the performance of the algorithm.In this paper, we analysis the characteristics of the automatic software test case generation problem which is based on path coverage, design a self-adaptive fitness function and then propose an improved differential evolution algorithm(DE) which is combined with local search for solving the problem. The main work of this paper includes the following three aspects:(1)We design a self-adaptive fitness function that is suitable for simultaneous searching of multiple paths. Compare with the evaluation function ever before, the proposed fitness function needn’t to select randomly a path as the target and can guide the individuals to cover any branches which have not been covered yet. Combined with the proposed fitness function, we apply differential evolution algorithm which is fit for solving the multi-variable and nonlinear combinatorial optimization problem for solving the automatic software test case generation problem. Compare with random algorithm, genetic algorithm and artificial bee colony algorithm, differential evolution algorithm shows a better performance and consumes less candidate test cases when the path coverage of the software programs under test is 100%.(2) It exists differences between different paths of software programs, according to this characteristics, a differential evolution algorithm based on local search is proposed, which is trying to guide the individuals to explore the untapped area. In this method, when an individual can’t produce a new effective test case that can cover an uncovered path for a long time, the individual will be guided to search the area where the effective test cases seldom go to hit to improve the performance of algorithm to solve the problem.(3)We design the software based on path coverage that can generate test cases automatically. And the improved differential evolution algorithm is proposed in this paper is as the core algorithm of the software. It is applied to the test cases automatic generation in the decision tree of weather and the dictionary tree. The results show that it can generate effective test cases of different paths in software programs in a relatively short time, meanwhile the path coverage rate can achieve 100%.
Keywords/Search Tags:Differential evolution algorithm, Adaptive fitness functions, Path coverage, Test case generation
PDF Full Text Request
Related items