期刊文献+

结合SVM与XGBoost的链式多路径覆盖测试用例生成

Multi-path Coverage Test Case Generation Combining Chained SVM and XGBoost
下载PDF
导出
摘要 机器学习方法可很好地与软件测试相结合,增强测试效果,但少有学者将其运用于测试数据生成方面.为进一步提高测试数据生成效率,提出一种结合SVM(support vector machine)和XGBoost(extreme gradient boosting)的链式模型,并基于此模型借助遗传算法实现多路径测试数据生成.首先,利用一定样本训练若干个用于预测路径节点状态的子模型(SVM和XGBoost),通过子模型的预测精度值筛选最优子模型,并根据路径节点顺序将其依次链接,形成一个链式模型C-SVMXGBoost(chained SVM and XGBoost).在利用遗传算法生成测试用例时,使用训练好的链式模型代替插桩法获取测试数据覆盖路径(预测路径),寻找预测路径与目标路径相似的路径集,对存在相似路径集的预测路径进行插桩验证,获取精确路径,计算适应度值.在交叉变异过程中引入样本集中路径层级深度较大的优秀测试用例进行重用,生成覆盖目标路径的测试数据.最后,保留进化生成中产生的适应度较高的个体,更新链式模型C-SVMXGBoost,进一步提高测试效率.实验表明,C-SVMXGBoost较其他各对比链式模型更适合解决路径预测问题,可提高测试效率.并且通过与已有经典方法相比,所提方法在覆盖率上提高可达15%,平均进化代数也有所降低,在较大规模程序上其降低百分比可达65%. Machine learning methods can be well combined with software testing to enhance test effect,but few scholars have applied it to test data generation.In order to further improve the efficiency of test data generation,a chained model combining support vector machine(SVM)and extreme gradient boosting(XGBoost)is proposed,and multi-path test data generation is realized by a genetic algorithm based on the chained model.Firstly,this study uses certain samples to train several sub-models(i.e.,SVM and XGBoost)for predicting the state of path nodes,filters the optimal sub-models based on the prediction accuracy value of the sub-models,and links the optimal sub-models in sequence according to the order of the path nodes,so as to form a chained model,namely chained SVM and XGBoost(C-SVMXGBoost).When using the genetic algorithm to generate test cases,the study makes use of the chained model that is trained instead of the instrumentation method to obtain the test data coverage path(i.e.,predicted path),finds the path set with the predicted path similar to the target path,performs instrumentation verification on the predicted path with similar path sets,obtains accurate paths,and calculates fitness values.In the crossover and mutation process,excellent test cases with a large path level depth in the sample set are introduced for reuse to generate test data covering the target path.Finally,individuals with higher fitness during the evolutionary generation are saved,and C-SVMXGBoost is updated,so as to further improve the test efficiency.Experiments show that C-SVMXGBoost is more suitable for solving the path prediction problem and improving the test efficiency than other chained models.Moreover,compared with the existing classical methods,the proposed method can increase the coverage rate by up to 15%.The mean evolutionary algebra is also reduced,and the reduction percentage can reach 65%on programs of large size.
作者 钱忠胜 俞情媛 张丁 姚昌森 秦朗悦 成轶伟 QIAN Zhong-Sheng;YU Qing-Yuan;ZHANG Ding;YAO Chang-Sen;QIN Lang-Yue;CHENG Yi-Wei(School of Information Management,Jiangxi University of Finance and Economics,Nanchang 330013,China)
出处 《软件学报》 EI CSCD 北大核心 2024年第6期2795-2820,共26页 Journal of Software
基金 国家自然科学基金(62262025) 江西省自然科学基金重点项目(20224ACB202012)。
关键词 测试用例 SVM XGBoost 链式模型 多路径覆盖 test case support vector machine(SVM) extreme gradient boosting(XGBoost) chained model multi-path coverage
  • 相关文献

参考文献12

二级参考文献77

  • 1单锦辉,姜瑛,孙萍.软件测试研究进展[J].北京大学学报(自然科学版),2005,41(1):134-145. 被引量:138
  • 2邱晓康,李宣东.一个面向路径的软件测试辅助工具[J].电子学报,2004,32(F12):231-234. 被引量:12
  • 3张铃,吴福朝,张钹,韩玫.多层前馈神经网络的学习和综合算法[J].软件学报,1995,6(7):440-448. 被引量:33
  • 4傅博.基于蚁群算法的软件测试数据自动生成[J].计算机工程与应用,2007,43(12):97-99. 被引量:32
  • 5Challagulla V U B, Bastani F B, I-Ling Yen, Paul R A. Empirical assessment of machine learning based software defect prediction techniques//Proceedings of the 10th IEEE International Workshop on Object-Oriented Real-Time Dependable Systems. Washington, DC, USA, 2005:263-270.
  • 6Lyu Michael R. Handbook of Software Reliability Engineering. New York: IEEE Computer Society Press and McGrawHill Book Company, 1996.
  • 7Khoshgoftaar Taghi M, Seliya Naeen. Tree-based software quality estimation models for fault predietion//Proeeedings of the 8th International Symposium on Software Metrics. Washington, 13(3, USA, 2002x 123-128.
  • 8Stich Timothy Janes, Spoerre Julie K, Velasco Tomas. The application of artificial neural networks to monitoring and control of an induction hardening process. Journal of Industrial Technology, 2000, 16(1): 1-11.
  • 9Ohlsson Niclas, Alberg Hans. Predicting fault-prone software modules in telephone switches. IEEE Transactions on Software Engineering, 1996, 22(12): 886-894.
  • 10Khoshgoftaar Taghi M, Seliya Naeem. Software quantity classification modeling using the SPRINT decision tree algorithm//Proceedings of the 14th IEEE International Conference on Tools with Artificial Intelligence. Washington, DC, USA, 2002:365-367.

共引文献166

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部