Abstract

The aim of software testing is to find faults in the program under test. Previous methods of path-oriented test data generation can generate test data traversing target paths, but they may not guarantee to find faults in the program. We present a method of evolutionary generation of test data for path coverage with faults detection in this paper. First, we establish a mathematical model of the problem considered in this paper, in which the number of faults detected in the path traversed by test data, and the risk level of faults are optimization objectives, and the approach level of the traversed path from the target one is a constraint. Then, we generate test data using a multi-objective evolutionary optimization algorithm with constraints. Finally, we apply the proposed method in a benchmark program bubble sort and an industrial program totinfo, and compare it with the traditional method. The experimental results conform that our method can generate test data that not only traverse the target path but also detect faults in it. Our achievement provides a novel way to generate test data for path coverage with faults detection.

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