基于遗传算法的Java语言动态单元测试数据生成

Zhela Jalal Rashid, M. F. Adak
{"title":"基于遗传算法的Java语言动态单元测试数据生成","authors":"Zhela Jalal Rashid, M. F. Adak","doi":"10.1109/UBMK52708.2021.9558953","DOIUrl":null,"url":null,"abstract":"Random test data generators are among the most widely used tools to generate input data for the tests. However, the data types and parameters have to be manually tailored into the tools and need to be updated manually once the source code or the test cases are changed. It is a costly process and takes a lot of time and effort to generate and update these data. Various test data generator tools are available, such as random test data generators, symbolic evaluators, and function minimization methods. In recent years some more advanced heuristic search techniques have been applied to software testing. In this study, we propose a model which automates the test data generation process. It significantly reduces the time required to generate the input data. At the same time, the data generated by our model outperforms the data generated randomly in terms of the accuracy and sensibility of the input data. It is based on the most widely used heuristic algorithm, the genetic algorithm (GA). We run the model on a sample class with six independent public methods of the different method signature, return type, and several arguments. It takes 5 seconds to generate ten possible inputs for each method with a mean, standard deviation of 0.15 and best candidate fitness average of 8.82, and means fitness of 9.79.","PeriodicalId":106516,"journal":{"name":"2021 6th International Conference on Computer Science and Engineering (UBMK)","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2021-09-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"Test Data Generation for Dynamic Unit Test in Java Language using Genetic Algorithm\",\"authors\":\"Zhela Jalal Rashid, M. F. Adak\",\"doi\":\"10.1109/UBMK52708.2021.9558953\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Random test data generators are among the most widely used tools to generate input data for the tests. However, the data types and parameters have to be manually tailored into the tools and need to be updated manually once the source code or the test cases are changed. It is a costly process and takes a lot of time and effort to generate and update these data. Various test data generator tools are available, such as random test data generators, symbolic evaluators, and function minimization methods. In recent years some more advanced heuristic search techniques have been applied to software testing. In this study, we propose a model which automates the test data generation process. It significantly reduces the time required to generate the input data. At the same time, the data generated by our model outperforms the data generated randomly in terms of the accuracy and sensibility of the input data. It is based on the most widely used heuristic algorithm, the genetic algorithm (GA). We run the model on a sample class with six independent public methods of the different method signature, return type, and several arguments. It takes 5 seconds to generate ten possible inputs for each method with a mean, standard deviation of 0.15 and best candidate fitness average of 8.82, and means fitness of 9.79.\",\"PeriodicalId\":106516,\"journal\":{\"name\":\"2021 6th International Conference on Computer Science and Engineering (UBMK)\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2021-09-15\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2021 6th International Conference on Computer Science and Engineering (UBMK)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/UBMK52708.2021.9558953\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 6th International Conference on Computer Science and Engineering (UBMK)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/UBMK52708.2021.9558953","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

摘要

随机测试数据生成器是用于为测试生成输入数据的最广泛使用的工具之一。然而,数据类型和参数必须手工裁剪到工具中,并且需要在源代码或测试用例更改后手工更新。这是一个昂贵的过程,需要花费大量的时间和精力来生成和更新这些数据。各种测试数据生成器工具都是可用的,例如随机测试数据生成器、符号求值器和函数最小化方法。近年来,一些更先进的启发式搜索技术被应用到软件测试中。在这项研究中,我们提出了一个自动化测试数据生成过程的模型。它大大减少了生成输入数据所需的时间。同时,我们的模型生成的数据在输入数据的准确性和敏感性方面都优于随机生成的数据。它是基于最广泛使用的启发式算法,遗传算法(GA)。我们在一个示例类上运行模型,该示例类具有六个独立的公共方法,这些方法具有不同的方法签名、返回类型和几个参数。每种方法生成10个可能的输入需要5秒,平均值为0.15,标准差为0.15,最佳候选适应度平均值为8.82,均值适应度为9.79。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Test Data Generation for Dynamic Unit Test in Java Language using Genetic Algorithm
Random test data generators are among the most widely used tools to generate input data for the tests. However, the data types and parameters have to be manually tailored into the tools and need to be updated manually once the source code or the test cases are changed. It is a costly process and takes a lot of time and effort to generate and update these data. Various test data generator tools are available, such as random test data generators, symbolic evaluators, and function minimization methods. In recent years some more advanced heuristic search techniques have been applied to software testing. In this study, we propose a model which automates the test data generation process. It significantly reduces the time required to generate the input data. At the same time, the data generated by our model outperforms the data generated randomly in terms of the accuracy and sensibility of the input data. It is based on the most widely used heuristic algorithm, the genetic algorithm (GA). We run the model on a sample class with six independent public methods of the different method signature, return type, and several arguments. It takes 5 seconds to generate ten possible inputs for each method with a mean, standard deviation of 0.15 and best candidate fitness average of 8.82, and means fitness of 9.79.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Emotion Analysis from Facial Expressions Using Convolutional Neural Networks Early Stage Fault Prediction via Inter-Project Rule Transfer Semantic Similarity Comparison of Word Representation Methods in the Field of Health Small Object Detection and Tracking from Aerial Imagery Anomaly Detection with Deep Long Short Term Memory Networks
×
引用
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