Abstract
Normally, program execution spends most of the time on loops. Automated test data generation devotes special attention to loops for better coverage. Automated test data generation for programs having loops with variable number of iteration and variable length array is a challenging problem. It is so because the number of paths may increase exponentially with the increase of array size for some programming constructs, like merge sort. We propose a method that finds heuristic for different types of programming constructs with loops and arrays. Linear search, Bubble sort, merge sort, and matrix multiplication programs are included in an attempt to highlight the difference in execution between single loop, variable length array and nested loops with one and two dimensional arrays. We have used two parameters/heuristics to predict the minimum number of iterations required for generating automated test data. They are longest path level (kL) and saturation level (kS). The proceedings of our work includes the instrumentation of source code at the elementary level, followed by the application of the random inputs until all feasible paths or all paths having longest paths are collected. However, duplicate paths are avoided by using a filter. Our test data is the random numbers that cover each feasible path.
Highlights
In software testing, loops are important spot for error detection
For example for array size=20 as shown in table 5, the value of the longest path become constant at k = 170 and kL =170
It has been observed that value of kL can be computed for any array size and programming construct with less effort as compared to kS
Summary
Loops are important spot for error detection. Execution of program spend large amount of time in loops. Infinite loop creates lots of problem in detecting the errors. Automated test data is generated using symbolic value, actual value, and combining both. One of the main problems in test data generation is detection of infeasible path. Statistics reveals that many paths of a program can be infeasible[5]. The symbolic execution method suffers for infeasible path detection due to non availability of efficient constraint solver and path feasibility detector. The actual value execution method may spend lot of computation to detect the infeasible path. It is observed that combined approach [16] is better method for avoiding infeasible path. It has been found that [16], the PathCrawler prototype tool is a more convenient method for automatic test data generation of programs
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
More From: International Journal of Software Engineering & Applications
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.