Recording (And Playback) Of User Actions In Java?
mnalsky asks: "I need an automated system for Java applications testing. I'd like the system to be able to record user session of Swing application and dump it to a file. Then one can play back this file and the application will repeat all of the steps. I've searched through the Web for it and have found nothing. Sun had its tool JavaStar, but in November, 1999 they stopped developing it. Now it's not possible to download JavaStar from their Web site, and I can't find it anywhere else on the Web. Are there any other tools like this? Is JavaStar available somewhere that I might have missed?"
When you want to play back the user's actions, disable logging, and then call dispatchEvent() with each of the deserialized events. That should give you a play-by-play exact copy of everything the user did (including moving the mouse...)
This won't work if you have multiple windows unless you're creative... so be creative with it.
Standard disclaimer that this doesn't represent professional advice and I've never tried it, but it might work...
(Also, an AC mentioned java.awt.RobotThis class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed. The primary purpose of Robot is to facilitate automated testing of Java platform implementations.)
You are in a maze of twisty little relative jumps, all alike.
I HIGHLY recommend checking out the FAQ for the usenet group: comp.software.testing . It can be found at: http://www.faqs.org/faqs/soft war e-eng/testing-faq/ or at: http://www.cigital.com/c.s.t.faq.html
There's MUCH MORE to automated testing that just recording and playing back keyboard/mouse input.
Here are some of the issues that need to be dealt with:
I could go on and on, but this hopefully gives a hint to the complexity and difficulty in automated testing. (And, yes, I've stumbled upon ALL of these myself at one time or another.)