Font Size: a A A

Research Of Automatic Test Cases Generation Of Full Path Based On SA Rule

Posted on:2012-01-07Degree:MasterType:Thesis
Country:ChinaCandidate:H H CuiFull Text:PDF
GTID:2178330335968505Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Test cases play a core role in software testing, the manual generation of test cases can not meet the needs of modern software development, making the automatic generation of test cases become a research hotspot. There are two methods, specification-based and structure-based in automatic generation of test cases.Artificial intelligence:particle swarm optimization, genetic algorithms, BP neural network algorithm, chaos theory, also be used for automatic generation of test cases. Path testing is the strongest criteria in the white box testing, so the structure-based automatic generation of test cases is always been of concern. Currently, automatic test cases generation methods of single-path are more used. In the literature listed the most common automatic test cases generation methods of single-path, such as:random, dynamic method and symbolic execution method. Full path is the program of all the possible paths in the program, if all the possible paths have been tested is called the full path testing. In single file,based on the full path of testing's advantages are:test without specifying the path, because the specified path itself is more trouble;test cases of full path cover all the executable path of the program, testing the feasible path in the program more comprehensively;to compute all process paths for complex structure is not desirable, so how to design a search method based on full path has great significance for practical application.This paper designs a system framework based on SA(Source Analysis) rule automatic test cases generation methods of full path. The framework including: initialization components, program analysis component, optimizing component and result analysis component, four parts. Paper made a more detailed discussion about program analysis component and optimizing component's function and algorithm. Program analysis component has two main tasks:First, make a static analysis for test objectives, the main focus on the source of the semantic analysis and syntax analysis; the second is using SA rule to analysis the source program line by line, use keyword to analysis structure of the program and plug the appropriate node, the purpose of plug the appropriate node is to record statement execution, get a directed graph with nonnegative weights and the object function which has been plugged. SA rules have developed solution for constructing solution about source code's directed graph with nonnegative weights, directed graph with nonnegative weights solution can exclude loops in source program,and simplify the path of the source program. Optimization component has three tasks:First, get the non-repetition path, to search for all the non-repetition path in the directed graph with nonnegative weights, and store the path to the set of non-repetition; second, put the initialized test data into surce program which has been pluged to execute, get the actual execution path of test data; third, calculate the coverage of the executed path, in this work, has developed solution using particle swarm optimization algorithm to select the set of test cases. If it meets the pre-set threshold, then this group of test data is the more appropriate test cases of this program, if not met, continue to be adjusted using the particle swarm optimization algorithm.In this paper, by the process of a automatic test cases generation, to verify based on SA rules automatic generation test cases of full path is feasible.
Keywords/Search Tags:Full Path Test Case, Particle Swarm Optimization, Static Analysis, SA Rule, Non-repetition Path Search Algorithm, Path Similarity Calculation
PDF Full Text Request
Related items