The invention discloses a protocol layering test generation method based on a parallel expansion finite-state
machine. The method comprises steps as follows: a
protocol specification of to-be-tested network equipment is described into a parallel expansion finite-state
machine model; a variable use condition of each component model in the parallel expansion finite-state
machine model is described into a state machine
dependency graph; according to the state machine
dependency graph, a component state machine
reachability graph is generated with a bottom up
reachability graph generating
algorithm; a component state machine local
test set is generated according to the component state machine
reachability graph; and according to the state machine
dependency graph, the component state machine local
test set is enabled to generate a component state machine parallel
test set with a top-down generating
algorithm. According to the method, the dependency graph is introduced, and in the test generating process, the bottom up reachability graph generating
algorithm and the top-down test generating algorithm are used according to the dependency graph, so that performability of a generated
test sequence is ensured, and simultaneously, the state explosion problem is solved through layering generating.