I am looking into programming an automated testing program for Java applications. This will be similar to a stripped version of WinRunner for Java apps. I understand how WinRunner uses the win32 API to simulate key, mouse strokes, and other events, but I figure the JVM does not allow the same methodology. What direction do I go in order to allow myself access to a Java application and simulate human or internal input? Are hooks placed into a reworked virtual machine or is at simple as setting up an RMI, or something in a totally different direction? Are there any books that would go into this sort of detail? Any information would greatly be appreciated.