The Simulink/State flow is a model used for modeling and simulation for dynamic system. However, Simulink/State flow is not suitable for the automatic generation of test cases. This paper adopts the hierarchical interface automata to depict the test model and presents the transformation method from Simulink/State flow to hierarchical interface automata. The Simulink sub-model and State flow sub-model will be transformed to hierarchical interface automata respectively and then combined together. In the transformation method presented in this paper, the hierarchical structure of Simulink/State flow model has been analyzed, and the generated hierarchical interface automata will be consistent with the original Simulink/State flow model in structure.