Automated Software Test Data Generation With Generative Adversarial Networks

With the rapid increase of software scale and complexity, the cost of traditional software testing methods will increase faster than the scale of software. In order to improve test efficiency, it is particularly important to automatically generate high-quality test cases. This paper introduces a framework for automatic test data generation based on the generative adversarial network (GAN). GAN is employed to train a generative model over execution path information to learn the behavior of the software. Then we can use the trained generative model to produce new test data, and select the test data that can improve the branch coverage according to our proposed selection strategy. Compared to prior work, our proposed method is able to handle programs under test with large-scale branches without analyzing branch expressions. In the experiment, we exhibit the performance of our method by using two modules in GNU Scientific Library. In particular, we consider the application of our method in two testing scenarios; unit testing and integration testing, and conduct a series of experiments to compare the performance of three types of GAN models. Results indicate that the WGAN-GP shows the best performance in our framework. Compared with the random testing method, the WGAN-GP based framework improves the test coverage of five functions out of the seven in the unit testing.

[1]  Leonid Joffe,et al.  A Generative Neural Network Framework for Automated Software Testing , 2020, ArXiv.

[2]  Jianqi Shi,et al.  A deep convolution generative adversarial networks based fuzzing framework for industry control protocols , 2020, J. Intell. Manuf..

[3]  Mojtaba Vahidi-Asl,et al.  Constructing Automated Test Oracle for Low Observable Software , 2019, Scientia Iranica.

[4]  Jing Chen,et al.  SmartSeed: Smart Seed Generation for Efficient Fuzzing , 2018, ArXiv.

[5]  Jianqi Shi,et al.  GANFuzz: a GAN-based industrial network protocol fuzzing framework , 2018, CF.

[6]  Léon Bottou,et al.  Wasserstein Generative Adversarial Networks , 2017, ICML.

[7]  Aaron C. Courville,et al.  Improved Training of Wasserstein GANs , 2017, NIPS.

[8]  Trevor Darrell,et al.  Adversarial Feature Learning , 2016, ICLR.

[9]  Gordon Fraser,et al.  1600 faults in 100 projects: automatically finding faults while achieving high coverage with EvoSuite , 2015, Empirical Software Engineering.

[10]  Yuanyuan Zhang,et al.  Achievements, Open Problems and Challenges for Search Based Software Testing , 2015, 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST).

[11]  Abhishek Singhal,et al.  Generation of test oracles using neural network and decision tree model , 2014, 2014 5th International Conference - Confluence The Next Generation Information Technology Summit (Confluence).

[12]  Seyed Reza Shahamiri,et al.  Artificial neural networks as multi-networks automated test oracle , 2012, Automated Software Engineering.

[13]  Siti Zaiton Mohd Hashim,et al.  An automated framework for software test oracle , 2011, Inf. Softw. Technol..

[14]  Phil McMinn,et al.  Search-Based Software Testing: Past, Present and Future , 2011, 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops.

[15]  John A. Clark,et al.  A search-based framework for automatic testing of MATLAB/Simulink models , 2008, J. Syst. Softw..

[16]  Hong Zhu,et al.  Software unit test coverage and adequacy , 1997, ACM Comput. Surv..

[17]  Kai Chen,et al.  FuzzGuard: Filtering out Unreachable Inputs in Directed Grey-box Fuzzing through Deep Learning , 2020, USENIX Security Symposium.

[18]  Hui Zhao,et al.  An Intelligent Fuzzing Data Generation Method Based on Deep Adversarial Learning , 2019, IEEE Access.