Recording Scripts: Starting Record Mode


To enter Record mode:

  1. If the Record/Playback window is not open, follow the steps in the Starting Your Application or Applet (the "Preparing to Use JavaStar" chapter).

  2. If your application is up but the first dialog in the application is modal, use Ctrl-Alt-F7 to continue.
    If Ctrl-Alt-F7 doesn't work on your system, try Ctrl-Shift-F7 or Ctrl-Meta-F7. The meta keys (when included on a keyboard) are marked with diamond symbols and located on either side of the spacebar.

  3. In the Record/Playback window, click Record.
    Because JavaStar brings the application or applet to the forefront, you may need to click on the edge of the Record/Playback window to activate that window, or drag your program window to one side.
    The Record Test dialog window opens.

    Record Test Script window

  4. Define the name you want to use for the script.
    Type the filename directly into the Create script field, or browse to locate a test you want to overwrite. JavaStar creates a .java and .class file for the name you provide.

  5. If your program under test includes non-components, specify the locator you want to reference.
    For a description of non-components, locators, and to learn how and when to use them, see the chapter "Locators for Non-Components." You need to read this chapter if you are testing an application or applet that uses a toolkit that does not derive from Java AWT.

    Note - JavaStar provides locators for the Bongo and IFC toolkits.

  6. If you want to record with declarations, enter the name of the declaration files you want to reference in Record with map files.
    This feature is useful if you've already recorded declarations for your program under test and have edited those declaration files to use abstracted names. By specifying the declaration files you want to use, you set JavaStar to record using these files, instead of using default component names.
    To specify the declarations files you want to use, click Map list... to select from a list. If you can't locate declarations you know you recorded, check to see if you have compiled the declarations into .class files.

    Note - You can learn more about declaration files in the chapter "Generating and Using Declarations."

  7. If you want to record using delays between events, toggle the Record with delays checkbox on.
    When you record with delays, JavaStar notes the length of any delay between recorded events and includes that delay in the test. Usually recording with delays is not necessary, but if your application has a Canvas component, or if it uses a non-AWT toolkit without a Locator, you need to toggle this option on. If delays aren't important to your test, leave this option off.

  8. Click OK.
    The Record/Playback window opens (see Figure 4-2). The action buttons appear along the left side of the window.

    Record/Playback window during record mode

  9. Test your application or applet by interacting with the program directly.
    JavaStar records your actions and dynamically displays the Java code it generates in the log panel.

  10. Click Stop to end recording.



Send feedback to JavaStar-feedback@suntest.com
Copyright © 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303. All rights reserved.