{"title":"Enhanced Genetic Algorithm for Automatic Generation of Unit and Integration Test Suite","authors":"Bui Thi Thao Anh","doi":"10.1109/RIVF48685.2020.9140778","DOIUrl":null,"url":null,"abstract":"Software testing is the most effort consuming phase in software development process. To minimize the human effort and maximize the number of faults detected, it is desirable to generate automatically test cases. The white box testing approach aims to study the internal structure and behavior of a program by considering some source code coverage criteria. The generation of test cases can be formulated as an optimization problem: searching for a minimum set of test case with the aim of covering as many targets as possible, given an adequacy criterion. In this paper, we propose an enhanced genetic algorithm in order to automatically generate test cases for object-oriented classes. On the one hand, we aim to propose a new strategy for chromosome representation as well as genetic operators (i.e., selection, mutation and crossover) in order to augment the speed of GA and produce effective compact test suites. On the other hand, we adapt our proposed approach to generate test cases for not only unit testing of a method but also integration testing with other methods. The experiment has been conducted for some case studies to assess our proposed approach. The empirical results show that our GA outperformed the state of the arts and the generated test cases allowed to reveal faults which are hard to be found by individual testing.","PeriodicalId":171525,"journal":{"name":"Conference on Research, Innovation and Vision for the Future in Computing & Communication Technologies","volume":"57 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Conference on Research, Innovation and Vision for the Future in Computing & Communication Technologies","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/RIVF48685.2020.9140778","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3
Abstract
Software testing is the most effort consuming phase in software development process. To minimize the human effort and maximize the number of faults detected, it is desirable to generate automatically test cases. The white box testing approach aims to study the internal structure and behavior of a program by considering some source code coverage criteria. The generation of test cases can be formulated as an optimization problem: searching for a minimum set of test case with the aim of covering as many targets as possible, given an adequacy criterion. In this paper, we propose an enhanced genetic algorithm in order to automatically generate test cases for object-oriented classes. On the one hand, we aim to propose a new strategy for chromosome representation as well as genetic operators (i.e., selection, mutation and crossover) in order to augment the speed of GA and produce effective compact test suites. On the other hand, we adapt our proposed approach to generate test cases for not only unit testing of a method but also integration testing with other methods. The experiment has been conducted for some case studies to assess our proposed approach. The empirical results show that our GA outperformed the state of the arts and the generated test cases allowed to reveal faults which are hard to be found by individual testing.