The software testing process is typically systematic in test data selection and test execution. However, the effective use of a test oracle has been neglected, despite that it is a critical component of the testing process. A test oracle prescribes the acceptable behavior for test execution. In the absence of the means of judging the test results with formal oracles, testing can not achieve its goal of revealing failures or assuring the correct behavior in a practical manner; manual checking is neither reliable nor cost-effective.
We propose an approach for deriving and using a oracle based on the sequence diagram of UML to enable the verification of test results for object oriented systems. We have designed a new temporal logic, called HDTL, and modified the tableau method to generate finite state machines from sequence diagrams. we have developed the verification framework where the state machines can be used as the oracle. Careful design of the framework makes it possible to detect anomalies, i.e, occurrences of events not specified in sequence diagrams.