Automated Software Test Input Generation with Diffusion Models
摘要
With the rapid growth of software size and complexity, traditional software testing methods are becoming increasingly costly. To improve test efficiency, we propose a novel approach for automated test input generation based on diffusion models, which are advanced techniques for generating high-quality data. Our approach leverages diffusion models to generate test inputs aimed at achieving higher code coverage. In our framework, diffusion models are used to generate test inputs that evaluate program behavior on programs using LLVM as an intermediate language. By training the diffusion model with execution path information, we can generate diverse test inputs that increase code coverage without requiring detailed analysis of branch expressions. We conducted experiments to compare the performance of diffusion models with GAN-based methods in terms of test input generation. The results show that the diffusion model-based framework significantly outperforms GAN-based methods in terms of test coverage. Our tests on two modules in the GNU Scientific Library showed that diffusion models can effectively generate test inputs that improve branch coverage. These results suggest that diffusion models hold great promise in the area of automated test input generation, providing an efficient and effective approach to increasing test coverage and software reliability.