Test data generation from Hibernate constraints

Krittaya Marin, C. Doungsa-ard
{"title":"Test data generation from Hibernate constraints","authors":"Krittaya Marin, C. Doungsa-ard","doi":"10.1109/SKIMA.2014.7083566","DOIUrl":null,"url":null,"abstract":"Hibernate framework is one the most widely used object-relational mapping framework in open source world. The framework extremely helps developers on working with the software development with databases. However, the persistence has to be implemented manually. Also, software testing is a way to make sure that defects should be found as many as possible. Nevertheless, it is not possible to do unit testing without test data. If test data can be generated automatically, the cost of software development should be reduced significantly. In this work, we proposed a method to generate the test data from a Java bean from Hibernate constraints annotations using search techniques. The search space has been generated by applying Feed4j according to each field constraint. The violation cases from Hibernate validator has been used as a Fitness function. The evaluation was done by the comparison analysis between the proposed approach i.e. genetic algorithm and a local search technique i.e. random search. The results showed that, our approach was more effective than the random search.","PeriodicalId":22294,"journal":{"name":"The 8th International Conference on Software, Knowledge, Information Management and Applications (SKIMA 2014)","volume":"54 1","pages":"1-6"},"PeriodicalIF":0.0000,"publicationDate":"2014-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"The 8th International Conference on Software, Knowledge, Information Management and Applications (SKIMA 2014)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SKIMA.2014.7083566","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

Hibernate framework is one the most widely used object-relational mapping framework in open source world. The framework extremely helps developers on working with the software development with databases. However, the persistence has to be implemented manually. Also, software testing is a way to make sure that defects should be found as many as possible. Nevertheless, it is not possible to do unit testing without test data. If test data can be generated automatically, the cost of software development should be reduced significantly. In this work, we proposed a method to generate the test data from a Java bean from Hibernate constraints annotations using search techniques. The search space has been generated by applying Feed4j according to each field constraint. The violation cases from Hibernate validator has been used as a Fitness function. The evaluation was done by the comparison analysis between the proposed approach i.e. genetic algorithm and a local search technique i.e. random search. The results showed that, our approach was more effective than the random search.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
从Hibernate约束中生成测试数据
Hibernate框架是开源世界中使用最广泛的对象关系映射框架之一。该框架极大地帮助了开发人员使用数据库进行软件开发。然而,持久性必须手动实现。此外,软件测试是确保尽可能多地发现缺陷的一种方法。然而,没有测试数据是不可能进行单元测试的。如果测试数据可以自动生成,软件开发的成本应该会显著降低。在这项工作中,我们提出了一种使用搜索技术从Hibernate约束注释的Java bean生成测试数据的方法。搜索空间是根据每个字段约束应用Feed4j生成的。Hibernate验证器中的违规案例被用作Fitness函数。通过遗传算法与局部搜索技术随机搜索的对比分析,对算法的有效性进行了评价。结果表明,该方法比随机搜索更有效。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
A rule-based approach to business-IT misalignment symptom detection Adaptive noise reduction algorithm based on gradient in wavelet feature domain Key note speech 1: Predicting the overall value of decisions relating to software Stochastic local search for pattern set mining Two-handed hand gesture recognition for Bangla sign language using LDA and ANN
×
引用
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