Software testing is an important phase in the life cycle of software which is one way to Assurant quality of software. The first step of software testing is to create test cases. The existing method to generate test cases may encounter two problems: test cases not feasible and state explosion problem. The tools we developed: first, according to the semantics of language, we translate program into a execution tree; then, to decompose input domain in the way top-down with path, Finally, output test cases according to the result of decomposition. Our tool is developed with Haskell Language. Our method can effectively solve the above two problems.