Search-based test data generation is a very popular domain in the field of automatic test data generation. However, existing search-based test data generators suffer fromsome problems. By combining static program analysis and search-based testing, our proposed approach overcomesone of these problems. Considering the automatic ability and the path coverage as the test adequacycriterion, this paper proposes using Particle Swarm Optimization, an alternative search technique, for automating the generation of test data for evolutionary structural testing. Experimental results demonstrate that our test data generator can generate suitable test data with higher path coverage than the previous one.