scholarly journals Path-Wise Test Data Generation Based on Heuristic Look-Ahead Methods

2014 ◽  
Vol 2014 ◽  
pp. 1-19 ◽  
Author(s):  
Ying Xing ◽  
Yun-Zhan Gong ◽  
Ya-Wen Wang ◽  
Xu-Zhou Zhang

Path-wise test data generation is generally considered an important problem in the automation of software testing. In essence, it is a constraint optimization problem, which is often solved by search methods such as backtracking algorithms. In this paper, the backtracking algorithm branch and bound and state space search in artificial intelligence are introduced to tackle the problem of path-wise test data generation. The former is utilized to explore the space of potential solutions and the latter is adopted to construct the search tree dynamically. Heuristics are employed in the look-ahead stage of the search. Dynamic variable ordering is presented with a heuristic rule to break ties, values of a variable are determined by the monotonicity analysis on branching conditions, and maintaining path consistency is achieved through analysis on the result of interval arithmetic. An optimization method is also proposed to reduce the search space. The results of empirical experiments show that the search is conducted in a basically backtrack-free manner, which ensures both test data generation with promising performance and its excellence over some currently existing static and dynamic methods in terms of coverage. The results also demonstrate that the proposed method is applicable in engineering.

Author(s):  
CHENGYING MAO ◽  
XINXIN YU

The quality of test data has an important impact on the effect of software testing, so test data generation has always been a key task for finding the potential faults in program code. In structural testing, the primary goal is to cover some kinds of structure elements with some specific inputs. Search-based test data generation provides a rational way to handle this difficult problem. In the past, some well-known meta-heuristic search algorithms have been successfully utilized to solve this issue. In this paper, we introduce a variant of genetic algorithm (GA), called quantum-inspired genetic algorithm (QIGA), to generate the test data with stronger coverage ability. In this new algorithm, the traditional binary bit is replaced by a quantum bit (Q-bit) to enlarge the search space so as to avoid falling into local optimal solution. On the other hand, some other strategies such as quantum rotation gate and catastrophe operation are also used to improve algorithm efficiency and quality of test data. In addition, experimental analysis on eight real-world programs is performed to validate the effectiveness of our method. The results show that QIGA-based method can generate test data with higher coverage in much smaller convergence generations than GA-based method. More importantly, our proposed method is more robust for algorithm parameter change.


2021 ◽  
Vol 2021 ◽  
pp. 1-11
Author(s):  
Wenning Zhang ◽  
Chongyang Jiao ◽  
Qinglei Zhou ◽  
Yang Liu ◽  
Ting Xu

Software testing is a widespread validation means of software quality assurance in industry. Intelligent optimization algorithms have been proved to be an effective way of automatic test data generation. Firefly algorithm has received extensive attention and been widely used to solve optimization problems because of less parameters and simple implement. To overcome slow convergence rate and low accuracy of the firefly algorithm, a novel firefly algorithm with deep learning is proposed to generate structural test data. Initially, the population is divided into male subgroup and female subgroup. Following the randomly attracted model, each male firefly will be attracted by another randomly selected female firefly to focus on global search in whole space. Each female firefly implements local search under the leadership of the general center firefly, constructed based on historical experience with deep learning. At the final period of searching, chaos search is conducted near the best firefly to improve search accuracy. Simulation results show that the proposed algorithm can achieve better performance in terms of success coverage rate, coverage time, and diversity of solutions.


2015 ◽  
Vol 2015 ◽  
pp. 1-15 ◽  
Author(s):  
Ying Xing ◽  
Yun-Zhan Gong ◽  
Ya-Wen Wang ◽  
Xu-Zhou Zhang

The increasing complexity of large-scale real-world programs necessitates the automation of software testing. As a basic problem in software testing, the automation of path-wise test data generation is especially important, which is in essence a constraint optimization problem solved by search strategies. Therefore, the constraint processing efficiency of the selected search algorithm is a key factor. Aiming at the increase of search efficiency, a hybrid intelligent algorithm is proposed to efficiently search the solution space of potential test data by making full use of both global and local search methods. Branch and bound is adopted for global search, which gives definite results with relatively less cost. In the search procedure for each variable, hill climbing is adopted for local search, which is enhanced with the initial values selected heuristically based on the monotonicity analysis of branching conditions. They are highly integrated by an efficient ordering method and the backtracking operation. In order to facilitate the search methods, the solution space is represented as state space. Experimental results show that the proposed method outperformed some other methods used in test data generation. The heuristic initial value selection strategy improves the search efficiency greatly and makes the search basically backtrack-free. The results also demonstrate that the proposed method is applicable in engineering.


Author(s):  
Madhumita Panda ◽  
Partha Pratim Sarangi ◽  
Sujata Dash

The proposed work emphasizes on the automated process of test data generation for unit testing of structured programs, targeting complete path coverage of the software under test. In recent years, Cuckoo Search (CS) has been successfully applied in many engineering applications because of its high convergence rate to the global solution. The authors motivated with the performance of Cuckoo search, utilized it to generate test suits for the standard benchmark problems, covering entire search space of the input data in less iterations. The experimental results reveal that the proposed approach covers entire search space generating test data for all feasible paths of the problem in few number of generations. It is observed that proposed approach gives promising results and outperforms other reported algorithms and it can be an alternative approach in the field of test data generation.


2009 ◽  
Vol 29 (6) ◽  
pp. 1722-1724
Author(s):  
Xiao-cheng HUANG ◽  
Xi-wu WANG ◽  
Dong-sheng CHANG ◽  
Gang HE

Sign in / Sign up

Export Citation Format

Share Document