Font Size: a A A

Research Of Test Data Generation Based On Genetic Algorithm

Posted on:2009-12-11Degree:MasterType:Thesis
Country:ChinaCandidate:Y N LvFull Text:PDF
GTID:2178360248454497Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Test data generation is the important content of software testing. The common method of software testing is executing the program within the test data to find the errors and faults. Manual test data generation has many shortcomings that workload is too fussy, test period is too long, and it is very easy to miss some errors. The technology of automatic test data generation can preferably make up these disadvantages. Path coverage is the common coverage criterion in software testing. With testers helping, automatic test data generation with path coverage can effectively improve the efficiency of unit test.This paper researches and analyses several approaches of automatic test data generation with path coverage. On the basis of the research, this paper applies GA in automatic test data generation. The algorithm designs the gene codes of the individuals and builds the initial population, constructs the fitness function for GA using instrumentation theory and branch functions, and then selectively breeds the successive generations using genetic operations. This generation process is repeated until the test data lead the program execution to achieve the target path. In order to construct the fitness function for GA, the paper improves on branch function and instrumentation approach. The paper also improves on coding strategy, crossover strategy and mutation strategy in order to satisfy requirement of the problem.Finally, design and implement an assistant tool that can automatically generate test data. Some results of studies of this algorithm are presented. The results show that, this algorithm is superior to random testing and Korel testing in efficiency.
Keywords/Search Tags:Software testing, Genetic algorithm, Path coverage, Test data generation
PDF Full Text Request
Related items