Abstract:During the path coverage testing of a Message Passing Interface (MPI) program based on evolutionary optimization, the fitness of evolutionary individuals needs to be evaluated by repeatedly executing the MPI program. However, the repeated execution of an MPI program often requires high computational costs. In view of this, this paper proposes an approach to test case generation for path coverage of MPI program guided by surrogate-assisted multi-task evolutionary optimization, which can significantly reduce the real execution times of the MPI program, thereby improving testing efficiency. Firstly, a surrogate model is trained for each target sub-path in a target path of the MPI program. Then, we estimate the fitness of evolutionary individuals using the surrogate model corresponding to each target sub-path, and form a candidate test case set. Finally, the surrogate model is updated based on the candidate test case set and its real fitness for each target sub-path. We employ the proposed approach to the basis path coverage testing of seven benchmark MPI programs, and compare it with several state-of-art approaches. The experimental results show that the proposed approach can significantly improve testing efficiency, and ensure high effectiveness in generating test cases.