Linlin Wen , Chengying Mao , Dave Towey , Jifu Chen
{"title":"An adaptive pairwise testing algorithm based on deep reinforcement learning","authors":"Linlin Wen , Chengying Mao , Dave Towey , Jifu Chen","doi":"10.1016/j.scico.2025.103353","DOIUrl":null,"url":null,"abstract":"<div><div>Pairwise testing is an important branch of combinatorial testing that focuses on finding a minimum test suite that satisfies pairwise coverage. However, most existing methods fail to achieve a good balance between exploration and exploitation capabilities when searching for the test suite, or may not fully utilize the information related to the already-generated test cases: This can lead to unsatisfactory performance in combination coverage. To address these limitations, we propose an adaptive pairwise testing framework based on deep reinforcement learning, APT-DRL. Using this, a deep reinforcement learning model for pairwise testing based on the Proximal Policy Optimization (PPO) method is developed. We design the pairwise coverage vector as the state space, and use neural networks to solve the search problem in this huge state space. To reduce the size of the Markov decision space, we also design a masking technique to avoid repeated generation of actions (test cases) that have already been used. We conducted experiments using APT-DRL and eight other baseline algorithms (representing three categories): The results show that APT-DRL, as a novel pairwise testing method, significantly outperforms four random-based pairwise testing methods (RT, ARTsum, FSCS-HD, and FSCS-SD); is comparable to, or surpasses, the two heuristic algorithms (IPOG and AETG); and has better test-suite-generation efficiency and superior effectiveness than the two swarm-intelligence-based algorithms (GSTG and DPSO).</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"247 ","pages":"Article 103353"},"PeriodicalIF":1.5000,"publicationDate":"2025-06-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Science of Computer Programming","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0167642325000929","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Pairwise testing is an important branch of combinatorial testing that focuses on finding a minimum test suite that satisfies pairwise coverage. However, most existing methods fail to achieve a good balance between exploration and exploitation capabilities when searching for the test suite, or may not fully utilize the information related to the already-generated test cases: This can lead to unsatisfactory performance in combination coverage. To address these limitations, we propose an adaptive pairwise testing framework based on deep reinforcement learning, APT-DRL. Using this, a deep reinforcement learning model for pairwise testing based on the Proximal Policy Optimization (PPO) method is developed. We design the pairwise coverage vector as the state space, and use neural networks to solve the search problem in this huge state space. To reduce the size of the Markov decision space, we also design a masking technique to avoid repeated generation of actions (test cases) that have already been used. We conducted experiments using APT-DRL and eight other baseline algorithms (representing three categories): The results show that APT-DRL, as a novel pairwise testing method, significantly outperforms four random-based pairwise testing methods (RT, ARTsum, FSCS-HD, and FSCS-SD); is comparable to, or surpasses, the two heuristic algorithms (IPOG and AETG); and has better test-suite-generation efficiency and superior effectiveness than the two swarm-intelligence-based algorithms (GSTG and DPSO).
期刊介绍:
Science of Computer Programming is dedicated to the distribution of research results in the areas of software systems development, use and maintenance, including the software aspects of hardware design.
The journal has a wide scope ranging from the many facets of methodological foundations to the details of technical issues andthe aspects of industrial practice.
The subjects of interest to SCP cover the entire spectrum of methods for the entire life cycle of software systems, including
• Requirements, specification, design, validation, verification, coding, testing, maintenance, metrics and renovation of software;
• Design, implementation and evaluation of programming languages;
• Programming environments, development tools, visualisation and animation;
• Management of the development process;
• Human factors in software, software for social interaction, software for social computing;
• Cyber physical systems, and software for the interaction between the physical and the machine;
• Software aspects of infrastructure services, system administration, and network management.