| Software testing detects faults in software and ensures software quality,it is one of the most important phases in development of software. With the continuous expansion of software size, the cost is also increasing. Automation Software testing is an important way to reduce testing time and costs. Meanwhile, software testing is highly dependent upon faults detection ability of test cases.Therefore,test case generation plays a vital role in testing process and is main area of research in the field of software testing.Test case generation based on vulnerability constraint solve is one of Path-oriented method for test case generation.The method based on symbolic execution and divided into two parts,one is the establishment of symbolic execution system based on intermediate representation,and the other is adaptive vulnerability constraint build based on vulnerability type. Specifically, first of all static analysis of source code in order to obtain an intermediate representation of the program, the dependency graph and bug report and other related information; Then the system execute symbol substitution and path constraint collection on the related path statements on the basis of the program intermediate representation, at the same time,analyze the bug report concluded that vulnerability type and then build vulnerability constraints; Finally,merge path constraints and vulnerability constraints together and solve it, then test cases generated. The method of test case generation based on vulnerability constraint solve not only able to meet the requirements of the related path coverage, while the method generates test cases with strong error detection capability for vulnerability characteristics.Experimental results show that the test case generation method based on vulnerability constraint solve in the actual test can effectively generate test cases and generates test cases with strong error detection capabilities. |