Generating test data that can expose the faults of the program is an important issue in software testing. Al- though previous methods of covering path can generate test data to traverse target path, the test data gene...Generating test data that can expose the faults of the program is an important issue in software testing. Al- though previous methods of covering path can generate test data to traverse target path, the test data generated by these methods are difficult in detecting some low-probabilistic faults that lie on the covered paths. We present a method of generating test data for covering multiple paths to detect faults in this study. First, we transform the problem of cover- ing multiple paths and detecting faults into a multi-objective optimization problem with constraint, and construct a mathe- matical model for it. Then, we give a strategy of solving the model based on a weighted genetic algorithm. Finally, we ap- ply our method to several real-world programs, and compare it with several methods. The experimental results confirm that the proposed method can more efficiently generate test data that not only traverse the target paths but also detect faults lying in them than other methods.展开更多
基金This study was jointly funded by the Excellent Young Scholars of Higher University of Heilongjiang Province (1252G063), the National Natural Science Foundation of China (Grant No. 61375067), the National Basic Research Program of China (2014CB046306-2) the Nat- ural Science Foundation of Jiangsu Province (BK2012566), the Scientific and Technological Plan Project of Mudanjiang City (Z2013s043), and the Research Project of Mudanjiang Normal University (SY201216 and QY201214).
文摘Generating test data that can expose the faults of the program is an important issue in software testing. Al- though previous methods of covering path can generate test data to traverse target path, the test data generated by these methods are difficult in detecting some low-probabilistic faults that lie on the covered paths. We present a method of generating test data for covering multiple paths to detect faults in this study. First, we transform the problem of cover- ing multiple paths and detecting faults into a multi-objective optimization problem with constraint, and construct a mathe- matical model for it. Then, we give a strategy of solving the model based on a weighted genetic algorithm. Finally, we ap- ply our method to several real-world programs, and compare it with several methods. The experimental results confirm that the proposed method can more efficiently generate test data that not only traverse the target paths but also detect faults lying in them than other methods.