Abstract:For the issue that software test case generation in path test, this paper presents a software test case generation method based on improved PSO algorithm. Firstly, the fitness function in PSO algorithm is constructed by using the superposition of the score function, and the particle location updating strategy is improved. Then the control flow chart of the algorithm is built and the target path is chosen. After that we use the program to collect individual fitness values. Finally, the test data generation program is executed and the appropriate test data is obtained. The experimental results on the triangle classification case show that the proposed software test case generation method can generate more suitable test cases and reduce the generation time effectively.