Font Size: a A A

Research On Object-oriented Polymorphism Path And The Method To Generate Test Data

Posted on:2011-09-24Degree:MasterType:Thesis
Country:ChinaCandidate:Z X TanFull Text:PDF
GTID:2178360308458482Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Software testing is the key of guaranteeing software quality, and the most essential technique in testing is automatic generation of test data. The Object-Oriented techonologe(OO), which has been applied widely in recent years, has promoted codes reusability and increased the flexibility of program development.But at the same time, traditional software testing technologe can not meet the needs of the modern software development technologe any more because of its characteristics .As a widely used standard system modeling language, Unified Modeling Language (UML) has powerful function and it is easy to express. Many researches of OO software testing are centered on UML model, so researches on software testing based on UML model is favorable for advancing testing to early stage of software development period.Particle swarm optimization(PSO) is a population-based, self-adaptive search optimization technique first introduced by J.kennedy and R.C.Eberhart in 1995.PSO is simple in concept, few in parameters and easy in implementation, so it has attracted a lot of attention from researchers around the world and found applications in many areas. Scholars have tried to use genetic algorithm and other artificial intelligence techniques into software testing,and obtained certain of research fruit.But in the process of evolution algorithm's research,algorithm's detecting and development capability depend on one algorithm are often unable to utilize effectively.Therefore,fusing other optimized method to the PSO algorithm detecting process is an efficient method to raise the PSO algorithm detecting efficiency and solution quality.So the thesis fuses the Simulated Annealing algorithm's Metropolis thought to the PSO algorithm,SA-PSO fusion algorithm make in Swarm's flight process,the Swam not only can accept good function value point,but also can accept worse function value point by certain probability.In this thesis, a method of traversalling polymorphism expansion UML model to get the testing pathes is provided, and an approach to generate test data for testing pathes by SA-PSO is presented. Meanwhile, some examples are combined to introduce the procedure in detail and a test data automatic generation tool is designed to verify the methods .First, the thesis does thoroughly research for polymorphism testing based on UML model, combined polymorphism to extend UML activity diagram, and then brings forward a optimization algorithm to generate the testing path set which smaller in amount but higher in coverage rate by traversing expansion UML activity diagram. It solved the polymorphism testing problem of OO technologe effectively. Second ,according to the request of automatic generation of test data, utilizing the principle of simulated annealing algorithm to improve particle swarm optimization,the thesis applies improved PSO algorithm into software testing in order to generate test data for testing pathes. Finally, a test data automatic generation tool is designed ,tool has been demonstrated by a specific procedure examples and analyse the results. Experiment results show that the tool can generate optimization test data set through simulating actual call after code instrumentation in source program and complete test data automatic generation for objectives pathes.
Keywords/Search Tags:UML, Polymorphism, Testing Path, PSO, Test Data
PDF Full Text Request
Related items