Collecting Data Using the Same Set of Interface Options Each Time

Use the User Interface instrument to capture mouse movement, keystrokes, and other manually initiated steps in a trace document and play them back again during subsequent runs to replicate your initial actions. Proper testing of an app can require that you interact with it multiple times. Using the same actions each time you test provides a consistent testing platform, as testing results can be reliably compared to previous results to ensure that any changes made to your code have not adversely affected the app.

To record user interface events, such as mouse clicks and keystrokes
  1. Add the User Interface instrument to your trace document from the Library palette.

    ../Art/Collecting_Data_Using_the_Same_Set_Each Time_2x.png../Art/Collecting_Data_Using_the_Same_Set_Each Time_2x.png
  2. Click Record to begin gathering data.

  3. In the target application, click around and perform any other manual events you want to record.

  4. Return to Instruments and click Stop when the data you wish to repeat has been recorded.

  5. Choose File > Save to save the recording.

After recording events with the User Interface instrument, the recorded events appear in the track and detail panes of your trace document and are color-coded by type of event:

  • Blue - Mouse events

  • Green - Key events

  • Yellow - System events

The next time you record a trace, these manual steps are played back.

Definitive Discussion