The invention discloses a
software test case automatic generating method, belonging to the technical field of
software test
automation. The method comprises the following steps: 1, in the first phase, establishing a component Petri
network model on the basis of a tested object, wherein three objects, namely a structured language program, requirement or scene based description and a object oriented program are taken in the first phase); 2, in the second phase, collecting and storing fore-set and post-set of places and changes in a
Petri net (PN) model and related information of initialized condition and other model structures by utilizing an appropriate
data structure; 3, in the
third phase, analyzing and verifying the model (
deadlock, activity, boundedness,
accessibility and the like) by adopting a proper
algorithm according to the information collected in the second phase; 4, in the fourth phase, generating a
test case; 5, in the fifth phase, analyzing the
test case according to different coverage rate indexes; and 6, in the sixth phase, comprehensively analyzing according to the original requirement and quality requirement of a user so as to re-generate a test case set in accordance with the requirements.