Abstract:Aiming at the premature convergence of the standard particle swarm optimization (PSO) algorithm, a new PSO algorithm based on Tent chaos(TCPSO) is proposed to prioritize test cases. Firstly, the population is initialized by using the randomness, ergodicity and regularity of the improved Tent map, so that the particles are evenly distributed and the quality of the initial solution is improved. At the same time, chaotic search is carried out for the optimal particle and some of the worst particle in the current population to improve the diversity of the population. Finally, the branch coverage of the test case and Defect detection rate are used as the evaluation criterion to judge the quality of the test case. Experiments show that the improved method has advantages in branch coverage and defect detection rate index.