Work

Test data generation using deep reinforcement learning

Year: 2024
Type: article
Abstract: The process of creating test data for software is one of the most complex and labor-intensive stages in the software development cycle. It requires significant resources and effort, especially when it comes to achieving high test coverage. Search-Based Software Testing (SBST) is an approach that automates this process by using metaheuristic algorithms to generate test data. Metaheuristic algorithms, such as genetic algorithms or simulated annealing, operate on the principle of systematically exploring possible options and selecting the most effective solutions based on feedback from a fitness function. This process is similar to reinforcement learning, where an agent receives rewards for correct actions and penalties for incorrect ones, with the goal of optimizing overall performance. We have proposed a new approach that explores the feasibility of applying reinforcement learning in SBST, with the aim of replacing traditional, human-designed metaheuristic algorithms. To this end, we developed the GunPowder platform, which transforms the software testing process (STP) into a learning environment. In this environment, the agent uses the Double Deep Q-Networks (DDQN) method, which incorporates deep neural networks to learn the optimal strategy for interacting with the software under test. Our study involved a series of empirical experiments to evaluate the effectiveness of the proposed approach. The results indicate that agents trained using GunPowder can effectively learn and apply metaheuristic algorithms, achieving high branch coverage in training functions. In particular, our agents achieved 100% branch coverage in the case of training functions, demonstrating their ability to adapt to different test scenarios. These findings highlight the potential of using deep neural networks and reinforcement learning in SBST, which could significantly improve the quality and efficiency of the software testing process in the future. Thus, our work opens up new opportunities for integrating modern machine learning methods into automated software testing, potentially reducing the time and resources required for testing and improving the quality of final products.
Language: English
Subfield: Software
Open Access status: diamond
OpenAlex ID: W4404725110
FWCI: 1.068
Cites:
Cited by: 1
Related to: 10