{"title":"基于改进适应度函数的PSO优化基路径测试用例生成","authors":"Updesh Jaiswal, Amarjeet Prajapati","doi":"10.1145/3474124.3474197","DOIUrl":null,"url":null,"abstract":"The generation of an optimal number of test cases for the Basis path testing is a crucial and challenging optimization problem in the field of software testing. In the literature, a variety of Basis path testing approaches have been proposed. Recently, the search-based optimization approaches for the Basis path testing have been found more effective compared to the traditional analytical based approaches of Basis path testing. Even the existing search-based Basis path testing approaches can generate effective test cases covering most of the paths, still, there are many paths are remained uncovered. In this work, we propose a Particle Swarm Optimization (PSO) based test case selection approach for the Basis path testing. In this contribution, we introduce an improved fitness function namely Improved Fitness Function (IFF) that can guide the PSO based optimization process towards selection of best test case. For this, we use a High Probability of Coverage (HPC) path to define the IFF. To demonstrate our proposed approach, we conducted a detailed case study over the Largest among Three Numbers (LTN) program. The results of our case study show that the proposed approach can produce more better results in terms of all linearly independent paths coverage of Control Flow Graph (CFG).","PeriodicalId":144611,"journal":{"name":"2021 Thirteenth International Conference on Contemporary Computing (IC3-2021)","volume":"59 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-08-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"Optimized Test Case Generation for Basis Path Testing using Improved Fitness Function with PSO\",\"authors\":\"Updesh Jaiswal, Amarjeet Prajapati\",\"doi\":\"10.1145/3474124.3474197\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The generation of an optimal number of test cases for the Basis path testing is a crucial and challenging optimization problem in the field of software testing. In the literature, a variety of Basis path testing approaches have been proposed. Recently, the search-based optimization approaches for the Basis path testing have been found more effective compared to the traditional analytical based approaches of Basis path testing. Even the existing search-based Basis path testing approaches can generate effective test cases covering most of the paths, still, there are many paths are remained uncovered. In this work, we propose a Particle Swarm Optimization (PSO) based test case selection approach for the Basis path testing. In this contribution, we introduce an improved fitness function namely Improved Fitness Function (IFF) that can guide the PSO based optimization process towards selection of best test case. For this, we use a High Probability of Coverage (HPC) path to define the IFF. To demonstrate our proposed approach, we conducted a detailed case study over the Largest among Three Numbers (LTN) program. The results of our case study show that the proposed approach can produce more better results in terms of all linearly independent paths coverage of Control Flow Graph (CFG).\",\"PeriodicalId\":144611,\"journal\":{\"name\":\"2021 Thirteenth International Conference on Contemporary Computing (IC3-2021)\",\"volume\":\"59 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2021-08-05\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2021 Thirteenth International Conference on Contemporary Computing (IC3-2021)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3474124.3474197\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 Thirteenth International Conference on Contemporary Computing (IC3-2021)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3474124.3474197","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Optimized Test Case Generation for Basis Path Testing using Improved Fitness Function with PSO
The generation of an optimal number of test cases for the Basis path testing is a crucial and challenging optimization problem in the field of software testing. In the literature, a variety of Basis path testing approaches have been proposed. Recently, the search-based optimization approaches for the Basis path testing have been found more effective compared to the traditional analytical based approaches of Basis path testing. Even the existing search-based Basis path testing approaches can generate effective test cases covering most of the paths, still, there are many paths are remained uncovered. In this work, we propose a Particle Swarm Optimization (PSO) based test case selection approach for the Basis path testing. In this contribution, we introduce an improved fitness function namely Improved Fitness Function (IFF) that can guide the PSO based optimization process towards selection of best test case. For this, we use a High Probability of Coverage (HPC) path to define the IFF. To demonstrate our proposed approach, we conducted a detailed case study over the Largest among Three Numbers (LTN) program. The results of our case study show that the proposed approach can produce more better results in terms of all linearly independent paths coverage of Control Flow Graph (CFG).