Generating test data for both path coverage and fault detection using genetic algorithms
Generating test data for both path coverage and fault detection using genetic algorithms作者机构:School of Information and Electrical Engineering China University of Mining and Technology Xuzhou 221116 China School of Technology Mudanjiang Normal University Mudanjiang 157012 China
出 版 物:《Frontiers of Computer Science》 (中国计算机科学前沿(英文版))
年 卷 期:2013年第7卷第6期
页 面:822-837页
核心收录:
学科分类:0810[工学-信息与通信工程] 08[工学] 0835[工学-软件工程] 081001[工学-通信与信息系统] 081202[工学-计算机软件与理论] 0812[工学-计算机科学与技术(可授工学、理学学位)]
基 金:Acknowledgements This study was jointly funded by Fundamental Research Funds for Central Universities (2013XK09) the National Natural Science Foundation of China (Grant No. 61075061) the Excellent Young Scholars of Higher University of Heilongjiang Province (1252G063) the Natural Science Foundation of Jiangsu Province (BK2012566) the Specialized Research Fund for the Doctoral Program of Higher Education (20100095110006) the Excellent Creative Team Foundation of China University of Mining and Technology (2011ZCX002) and the Key Advanced Research Program of Mudanjiang Normal University (SY201216)
主 题:software testing path coverage fault detection test data multi-objective optimization genetic algorithms
摘 要:The aim of software testing is to find faults in a program under test, so generating test data that can expose the faults of a program is very important. To date, current stud- ies on generating test data for path coverage do not perform well in detecting low probability faults on the covered path. The automatic generation of test data for both path coverage and fault detection using genetic algorithms is the focus of this study. To this end, the problem is first formulated as a bi-objective optimization problem with one constraint whose objectives are the number of faults detected in the traversed path and the risk level of these faults, and whose constraint is that the traversed path must be the target path. An evolution- ary algorithm is employed to solve the formulated model, and several types of fault detection methods are given. Finally, the proposed method is applied to several real-world programs, and compared with a random method and evolutionary opti- mization method in the following three aspects: the number of generations and the time consumption needed to generate desired test data, and the success rate of detecting faults. The experimental results confirm that the proposed method can effectively generate test data that not only traverse the target path but also detect faults lying in it.