{"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}
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.