Font Size: a A A

Key Technology Research In Test Case Generation System Based On Genetic Algorithm

Posted on:2007-11-24Degree:MasterType:Thesis
Country:ChinaCandidate:P GuFull Text:PDF
GTID:2178360242461858Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Test case generation methods are one of the most important research content in software testing field recently. Genetic algorithm, as an effective optimization search algorithm, has received much attention of researchers around the world. Because of its strong modeling capability and good adaptability, genetic algorithm has also received more attention of researchers in software testing field. It became one of the most important methods for test case generation gradually. Fitness function affects the efficiency of searching most when applying genetic algorithm into test case generation system. On the other hand, selection function decides whether the algorithm can generate test cases for more paths. At present, basic genetic algorithm has low efficiency in test case generation, and it couldn't generate test cases for more paths at once. On the basis of that, an advanced genetic algorithm based on new fitness function and selection function is proposed to generate test case effectively.To deal with the low efficiency when applying genetic algorithm into test case generation system, the characteristic of fitness function is analyzed. A new kind of fitness function based on hamming distance is improved to make sense of relationship between parameters and path coverage. The fitness function uses path coverage states as its parameters. On the basis of that, an individual coding method including appended code is proposed. In the dual-structure code, the value of individual is present with grey code, and the appended code gives the range in mutation and crossover. The new coding method improves the local searching ability of the algorithm.To overcome the problem that genetic algorithm generates test case of one path every time, the selection function is analyzed. One the basis of the essential of multiple optimization problems, a new selection function based on power and roulette is proposed. The selection function considers all paths coverage to an individual, which develops the ability of genetic algorithm.The combination of improved fitness function and selection function was applied to test case generation, with the basic structure of genetic algorithm. According to compared with basic genetic algorithm, and the experimental results show that the efficiency using this method is higher than basic one, explaining that the method is useful in practice.
Keywords/Search Tags:test case, path coverage, genetic algorithm, fitness function, selection function
PDF Full Text Request
Related items