| As the computer technology improves rapidly,the scale of software have increased greatly,which make it more and more difficult to find a bug in software. As a result,the enhancement of software quality and reliability has become an important task in the field of software engineering.Test is an important step that guarantees software quality and reliability.It is an energy-consuming and time-consuming task.Therefore,improving the automation ability of software testing is very important for ensuring software's quality and reducing development cost, and improving the automation ability of testcase generation is the key point for the entire process.This article has analyzed the current situation and development of automatic generation technology of testcase and realization step and the basic principle of particle swarm optimization algorithm.And this article has discussed some improved versions of particle swarm optimization algorithm at length. On this basis, this article has improved particle swarm optimization algorithm and has put forward the frame of automatic testcase generation system based on particle swarm optimization algorithm,and automatic testcase generation functions based on particle swarm optimization algorithm. Finally,this article performed automatic testcase generation functions based on particle swarm optimization algorithm in C,and with which made experiments and analysis for a practical case.The main trait of this improved version of particle swarm optimization algorithm is simple in principle,few in tuning parameters,speedy in convergence and easy in implementation.Experiment has proved that this improved version of particle swarm optimization algorithm's convergence speed is generally faster than other algorithms such as genetic algorithm.This improved version of particle swarm optimization algorithm can increase the efficiency of automatic testcase generation.It still has some problems that will be the next step in the direction of the research. |