从Hibernate约束中生成测试数据

Krittaya Marin, C. Doungsa-ard
{"title":"从Hibernate约束中生成测试数据","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":"{\"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}","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

摘要

Hibernate框架是开源世界中使用最广泛的对象关系映射框架之一。该框架极大地帮助了开发人员使用数据库进行软件开发。然而,持久性必须手动实现。此外,软件测试是确保尽可能多地发现缺陷的一种方法。然而,没有测试数据是不可能进行单元测试的。如果测试数据可以自动生成,软件开发的成本应该会显著降低。在这项工作中,我们提出了一种使用搜索技术从Hibernate约束注释的Java bean生成测试数据的方法。搜索空间是根据每个字段约束应用Feed4j生成的。Hibernate验证器中的违规案例被用作Fitness函数。通过遗传算法与局部搜索技术随机搜索的对比分析,对算法的有效性进行了评价。结果表明,该方法比随机搜索更有效。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Test data generation from Hibernate constraints
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信