A method of testing case generation based on state transfer is proposed. Extended Finite State Machine is selected as the testing model. Combined with regular expression, this method passes state transfer according to test demand, and gains test case. It has been applied to the software test of control system.