Class integration testing is an important part in object-oriented software testing, and it is a key and difficult problem to determine the class integration test order of class cluster in integration testing. Reasonable class integration test order can reduce the overall complexity of test stub, and reduce test cost. A class integration test order determination method based on particle swarm optimization algorithm is proposed. First, all possible classes test orders are generated through permutation and combination, and each class test order is taken as a particle and is mapped to one dimensional space, and then each position in dimensional space represents a integration test order; Then, we calculate the velocity and position of each particle according to fitness function, and then choose the optimal position and the optimal fitness of the particles by particle swarm optimization algorithm, and obtain the optimal particle; Finally, according to the mapping relationship, we get the test order that the optimal particle is corresponding to, which is the optimal test order. The optimal test order makes the minimum overall complexity of test stub and the minimum test cost. The experimental results show that the proposed approach takes a lower test stub cost for solving the class test order problem, which is more effective. © 2018, Science Press. All right reserved.