{"title":"A Novel Fitness Function for Automated Software Test Case Generation Based on Nested Constraint Hardness","authors":"Thi-Mai-Anh Bui, Q. Bui, Van-Tri Do","doi":"10.1145/3583133.3590727","DOIUrl":null,"url":null,"abstract":"Search-Based Software Testing (SBST) has drawn a lot of interests as a powerful approach for automated test data generation. One major limitation of search-based methods is that they may get stuck in local optima and become inefficient if the fitness function does not provide any direction toward a test target, particularly when dealing with hard branch targets (e.g., nested predicates). Recent research has focused on enhancing the fitness function by taking branch hardness into account in order to direct the evolutionary process. However, either the characteristics of constraints (e.g., their involved variables' domain) are not taken into account or the difficulty level of a branch is separately studied. In this paper, we aim to address the test data generation with a focus on hard branches by proposing a novel fitness function based on nested constraints (i.e., including the target constraint and those that impact its coverage) and the domain sizes of their variables. The empirical study promises efficiency and effectiveness for the new fitness function. Our proposed approach outperforms its counterparts significantly, particularly for the branches that are difficult to be covered.","PeriodicalId":422029,"journal":{"name":"Proceedings of the Companion Conference on Genetic and Evolutionary Computation","volume":"3 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-07-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the Companion Conference on Genetic and Evolutionary Computation","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3583133.3590727","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Search-Based Software Testing (SBST) has drawn a lot of interests as a powerful approach for automated test data generation. One major limitation of search-based methods is that they may get stuck in local optima and become inefficient if the fitness function does not provide any direction toward a test target, particularly when dealing with hard branch targets (e.g., nested predicates). Recent research has focused on enhancing the fitness function by taking branch hardness into account in order to direct the evolutionary process. However, either the characteristics of constraints (e.g., their involved variables' domain) are not taken into account or the difficulty level of a branch is separately studied. In this paper, we aim to address the test data generation with a focus on hard branches by proposing a novel fitness function based on nested constraints (i.e., including the target constraint and those that impact its coverage) and the domain sizes of their variables. The empirical study promises efficiency and effectiveness for the new fitness function. Our proposed approach outperforms its counterparts significantly, particularly for the branches that are difficult to be covered.