Abstract

Test data generation is one of the main tasks of software testing. The goal of test data generation based on search algorithms is to automate the task and find test data that meet test criteria. In this study, an evolutionary generation method for test data that cover multiple paths is proposed. Firstly, the method obtains the coverage balance for each target path based on the number of individuals traversing the true and false branches of branch nodes, and calculates the individual's influence on coverage balance before and after an individual joining based on our previous work. Then, according to the number of branch nodes on each target path, the weights of different target paths are designed to obtain the individual fitness to adjust the evolution process and quickly generate test data covering multiple target paths. Finally, the proposed method is compared with existing techniques. Experimental results of benchmark programs and industrial use cases show that the proposed method can effectively improve the efficiency of test data generation for multiple paths.

Highlights

  • Software testing is an important verification method in software development

  • First, we present a test data generation model for multi-target paths, and the constraint requires that the traversed path is just one of the target paths

  • The main contributions of this study are as follows: 1) we construct a mathematical model for the problem of generating test data that can cover multiple paths; 2) we present an evolutionary optimization algorithm to solve the test data generation problem effectively and propose a function to get the fitness of each individual; 3) we apply our proposed method in several programs to confirm its effectiveness

Read more

Summary

Introduction

Software testing is an important verification method in software development. Its goal is to use the least test data to find as many faults as possible on the premise of satisfying the test criteria, thereby reducing the cost of software development [1,2]. In white box testing, compared with statement coverage and branch coverage, the path coverage criterion is more effective in white box testing, which means that each distinct path in the program is executed at least once [4]. It is very difficult to search the test data that traverse each path, because the paths in the program may be infinite in the case of loops, or infeasible in the case of nested branches. Different techniques have been proposed to search for test data that can achieve high path coverage [5,6]

Objectives
Results
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call