Abstract:EHF (event handler function) implements functionality of software and responds to user's operation on GUI (graphic user interface) element. GUI testing focuses on the conformance between specification and EHF as well as relations among EHFs. In order to solve the problems of large-scale of test cases and generation of invalid test cases, this paper proposes a new GUI test model named EHG based on event handler function. Using the model and the features of event handler functions, two test coverage criteria is constructed. Based on the criteria, a feedback-directed GUI test case generation is implemented. Experimental results show that the new approach not only effectively controls the scale of test case while eliminating invalid test cases, but also improves coverage of code structure.