6 Replies Latest reply on Apr 2, 2009 4:14 AM by jake_flex

    How to store events and later replay them?

    jake_flex Level 2

      I would like to store events sent by button clicks and then replay them later. Reason for doing this is to help in testing. My plan is to have a selected use scenarios which I can record and then playback as part of system testing. Like automated functional testing.

      What I have done so far, is that I can store the Event objects in an array, but don't know how to 'playback'. I have tried the EventDispatcher class and dispatchEvent method, but with no luck.

      Another use for this would be to store all the events a user is making, so incase he/she manages to crash or otherwise put the system in to an unwanted state, it would be easier to debug with the list of events and a possibility to put the system back to same state step by step.

      Attached are some code snippets, just to make the idea more clear

      Any help on how to do this is higly valued.