Abstract:Path testing is a very important and widely used structural testing method. Existing path generation methods are either time-consuming or labor-intensive, or they can generate a large number of redundant paths. To solve the above problem, this work mainly studies the optimization model of path selection problem and its evolutionary solution method. The purpose is to reduce the number of redundant paths and reduce test consumption without reducing test coverage. First, a number of paths are selected as the decision variable, and the number of edges and paths included in these paths are taken as the objective to formulate a multi-objective optimization model. Then, the multi-objective evolutionary algorithm is employed to solve the formulated model with the purpose of obtaining the target path set. The proposed method is applied to test 7 benchmark programs and it is compared with the existing method and greedy algorithm. Experimental results show that, compared with other algorithms, the proposed method can reduce the test consumption under the condition of ensuring test sufficiency, thereby improving the test efficiency.