The invention discloses a
test case generation method for dynamic
symbolic execution. The
test case generation method comprises the steps of generating a
control flow graph according to an input
structured text ST source program; modeling the variable attribute and the
standard function according to the
control flow diagram, generating an initial
test case, substituting the initial test case intothe
control flow diagram to execute to obtain a covered path, obtaining a constraint set, determining a candidate path
pool according to the constraint set, and selecting one path as an execution path; according to the modeled
standard function block,
standard function, variable attribute and conversion rule, converting and solving the constraint set on the execution path to obtain a new test case; and storing all test cases obtained by one input source program, determining coverage rate information according to the covered path, and outputting the test cases and the coverage rate information.The test case can be simply and quickly generated by using dynamic
symbolic execution, so that adverse effects caused by human factors are reduced; high-quality test cases and correct coverage rate information can be obtained, the
automation degree is high, and the labor cost is low.