Path-oriented Automatic Test Data Generation Driven by Component Linear Fitting Functions
- Author
- DingWenXu
- Advisor
- ZhaoJianHua , ChenZuo
- School
- Nanjing University
- Major
- Computer Software and Theory
- Classification
- TP311.52 Software Development
- Degree
- Master's thesis
- Year
- 2012
- Downloads
- 26
- Citations
- 1
- automatically test data generation
- path-oriented
- search based method
- component linear fitting function
Abstract
Software testing is one of the most important and effective methods that can guar-antee software quality, it also has been the most principal mean used by industry to guarantee software correctness. Limited dy computing power, time and space re-sources, testing is not able to try all possible execution for a program. In practise, test adequacy criterions are applied to drive and evaluate test processes. For a given test adequacy criterion, how to generate a test data set which can drive the execution of a program to cover relevant program architectures is the most critical progress in software testing. At present, test data generation is usually completed manually, which is not only time consuming, but also difficulty to guarantee the validity of test data. How to automatically generate effective test data for a test adequacy criterion is one of the hot issues in researches of software testing.Path-oriented coverage test criterion is a white-box test adequacy criterion which is used wildly, it requires test data driving a program executing along a given path. It has been proved in theory that there is no effective numerical method that can gener-ate test data for any path in a program. Existing approaches for this problem can be categorized into static analysis approaches and program execution based approaches. Static analysis approaches have difficulty in handling nonlinear path constraints. Pro-gram execution based approaches are likely to trap in local optima so that feasible test data can’t be found. Both categories of these approaches have limitations in practice.Aim at effectively generating test data for path-oriented test adequacy criterion, this thesis propose a novel path-oriented test data approach technique based on program execution. By tracking program execution, runtime values evaluated by input data on decision nodes are collected and component linear fitting functions with these values are constructed to approximate constraints on decision nodes. Further more, feasible solutions for path constraint system are searched based on the component linear fitting functions so that feasible input data for a given path is generated. The approach in this thesis can handle simple conditions and complex conditions effectively. A prototype tool for C language program is developed with Java language adopting this approach and experiments are studied with the tool. The details of the research in this thesis are as follows:·Research on constructing component linear fitting functions based on program execution and then approximating constraints on decision nodes in a given path. Firstly, the normal form of a constraint on a decision node is discussed, then branch function is introduced to be the normal express of the numerical expres-sion in the normal form on a decision node. With program instrumentation, values of branch functions on decision nodes evaluated by test input vector are derived. Two vector are entered at one time and they are only different at values of one component variable. The component linear fitting function on the interval is derived by computing a line which passes through these two points.·Research on automatically generating test data for pathes with only simple con-ditional decision nodes driven by component linear fitting functions. Component linear fitting functions on decision points are used to construct constraint system for the relevant path. A solution of the constraint system is a possible input for the path. Then the program execute on the input, either the path is covered, or the component linear fitting functions on decision nodes are revised base on re-sult of the execution and a new constraint system is derived to compute a new feasible solution. Component variable input domain enlargement is drawn into the progress in case of trapping in local optima.·Research on automatically generating test data for pathes with complex condi-tional decision nodes driven by component linear fitting functions. Simple con-ditions in a complex condition which are unsatisfied are added into constraint system one by one for a solution until a solution of the constraint system can satisfy the whole complex condition. ·A tool for path-oriented automated test data generation is developed by adopting the approach in this thesis. Several programs from a numerical computing pack-age NRC++is studied by experiments and compared to random test generation approach. The study indicates that the approach in this thesis is more effective in handling nonlinear constraints and local optima.
Table of contents
Summary 4-6
Abstract 6-9
directory 9-13
first chapter 13-23 <br / > 1.1 Background 13-17
1.1.1 software testing and software correctness 13-14
1.1.2 Introduction to software Testing 14-15
1.1.3 software testing criteria 15-17
1.2 for test data path automatically generate problems 17-20
1.2.1 -oriented path test case generation test 17 ??
1.2.2 path for automatic generation method research work 17-20
1.3 article 20-22
1.4 papers structural arrangements 22-23
Chapter II test data path for dynamic method based on automatic generation method 23-33
2.1 program control flow graph 23-24
2.2 path constraints and branch functions 24-26
2.3 z path coverage 26-27
2.4 program stub 27-29 <br / > 2.5 Eclipse platform plug- CDT 29-30
2.6 path for existing test data to automatically generate dynamic methods 30-32
2.7 Summary 32-33 < simple conditions br /> Chapter linear fitting function driven component of the path test data generation technology 33-51
3.1 component linear fitting function 33-35
3.2 component linear fit to establish and update functions 35-37
3.3 components using the linear regression function 37-41
3.4 branch variables to determine the correlation function 41-43
3.5 avoid local optima 43-46
3.6 instance handle 46-49
3.7 array 49-50 <br / > 3.8 Summary 50-51
Chapter linear fitting function driven component composite conditions path test data generation technology 51-59
4.1 C program logic operation Short-circuit mechanism 51-54
4.2 composite conditional expression to select branch function 54-55
4.3 instance 55-57
4.4 Summary 57-59
Chapter prototyping tools and case studies 59-67
5.1 tool structure and function 59-60
5.2 tool runs 60-62
5.3 tools to achieve Feature 62-63
5.4 Case Study 63-67
Chapter VI summary and Outlook 67 - 69
6.1 summarizes 67-68
6.2 The next step 68-69
References 69-73
during the master's degree completed scholarship 73
pursuing a master's degree research project participation during 73-75
Thanks 75-76