C/ c++项目单元测试中测试数据生成的混合方法

Tran Nguyen Huong
{"title":"C/ c++项目单元测试中测试数据生成的混合方法","authors":"Tran Nguyen Huong","doi":"10.25073/2588-1086/vnucsce.354","DOIUrl":null,"url":null,"abstract":"In recent years, automated test data generation from source code has gained a significantpopularity in software testing. This paper proposes a method, named Hybrid, to generate test datafor unit testing C/C++ projects. The method is a combination of two test data generation methodsnamed IBVGT and WCFT. In IBVGT method, the source code is analyzed to find simple conditions.Then, bases on these conditions, IBVGT generates test data for boundary values without having tosolve test paths constraints. This makes the method faster than BVTG method when generating testdata. In Hybrid method, while generating test data using WCFT, simple conditions are collected forboundary values test data generation. Test data generated by Hybrid are able to ensure both highsource code coverage and error detection ability. In addition, Hybrid is capable of finding infeasibleexecution paths and dead code. Experimental results with some popular unit functions show thatHybrid outperforms STCFG method in terms of test data generation time and boundary values relatederror detection. IBVGT is superior to BVTG in term of test data generation time whilst its boundaryvalues related error detection ability depends on the number of simple conditions inside each unitfunction.","PeriodicalId":416488,"journal":{"name":"VNU Journal of Science: Computer Science and Communication Engineering","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-12-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"A Hybrid Method for Test Data Generation for Unit Testing of C/C++ Projects\",\"authors\":\"Tran Nguyen Huong\",\"doi\":\"10.25073/2588-1086/vnucsce.354\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"In recent years, automated test data generation from source code has gained a significantpopularity in software testing. This paper proposes a method, named Hybrid, to generate test datafor unit testing C/C++ projects. The method is a combination of two test data generation methodsnamed IBVGT and WCFT. In IBVGT method, the source code is analyzed to find simple conditions.Then, bases on these conditions, IBVGT generates test data for boundary values without having tosolve test paths constraints. This makes the method faster than BVTG method when generating testdata. In Hybrid method, while generating test data using WCFT, simple conditions are collected forboundary values test data generation. Test data generated by Hybrid are able to ensure both highsource code coverage and error detection ability. In addition, Hybrid is capable of finding infeasibleexecution paths and dead code. Experimental results with some popular unit functions show thatHybrid outperforms STCFG method in terms of test data generation time and boundary values relatederror detection. IBVGT is superior to BVTG in term of test data generation time whilst its boundaryvalues related error detection ability depends on the number of simple conditions inside each unitfunction.\",\"PeriodicalId\":416488,\"journal\":{\"name\":\"VNU Journal of Science: Computer Science and Communication Engineering\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-12-16\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"VNU Journal of Science: Computer Science and Communication Engineering\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.25073/2588-1086/vnucsce.354\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"VNU Journal of Science: Computer Science and Communication Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.25073/2588-1086/vnucsce.354","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

近年来,从源代码自动生成测试数据在软件测试中获得了显著的普及。本文提出了一种为C/ c++项目的单元测试生成测试数据的方法——Hybrid。该方法结合了IBVGT和WCFT两种测试数据生成方法。在IBVGT方法中,对源代码进行分析,找到简单的条件。然后,基于这些条件,IBVGT生成边界值的测试数据,而无需解决测试路径约束。这使得该方法在生成测试数据时比BVTG方法更快。在混合方法中,在使用WCFT生成测试数据的同时,收集简单的条件来生成边界值测试数据。Hybrid生成的测试数据能够保证高源代码覆盖率和错误检测能力。此外,Hybrid能够找到不可行的执行路径和死代码。使用一些常用的单元函数进行的实验结果表明,athybrid在测试数据生成时间和边界值相关误差检测方面优于STCFG方法。IBVGT在测试数据生成时间上优于BVTG,而其边界值相关的错误检测能力取决于每个单元函数内部简单条件的个数。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
A Hybrid Method for Test Data Generation for Unit Testing of C/C++ Projects
In recent years, automated test data generation from source code has gained a significantpopularity in software testing. This paper proposes a method, named Hybrid, to generate test datafor unit testing C/C++ projects. The method is a combination of two test data generation methodsnamed IBVGT and WCFT. In IBVGT method, the source code is analyzed to find simple conditions.Then, bases on these conditions, IBVGT generates test data for boundary values without having tosolve test paths constraints. This makes the method faster than BVTG method when generating testdata. In Hybrid method, while generating test data using WCFT, simple conditions are collected forboundary values test data generation. Test data generated by Hybrid are able to ensure both highsource code coverage and error detection ability. In addition, Hybrid is capable of finding infeasibleexecution paths and dead code. Experimental results with some popular unit functions show thatHybrid outperforms STCFG method in terms of test data generation time and boundary values relatederror detection. IBVGT is superior to BVTG in term of test data generation time whilst its boundaryvalues related error detection ability depends on the number of simple conditions inside each unitfunction.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Aspect-Category based Sentiment Analysis with Unified Sequence-To-Sequence Transfer Transformers A Bandwidth-Efficient High-Performance RTL-Microarchitecture of 2D-Convolution for Deep Neural Networks Noisy-label propagation for Video Anomaly Detection with Graph Transformer Network FRSL: A Domain Specific Language to Specify Functional Requirements A Contract-Based Specification Method for Model Transformations
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1