Generating and Using Declarations: Editing Declarations Files to Use Abstract Names


One manual useful task involving declarations is the step of initially editing your declarations files to use abstracted names.

To do this:

  1. From the JavaStar main menu, select Edit Test Script.

  2. Load the your first JavaStar declaration file into the JavaStar Script Editor.

  3. Find the first declaration you want to abstract and edit this to use a name.
    Lines with the static keyword contain the names.
    For example, if your file contains the code:
    and you want to change textfield1 to a more meaningful name, replace it with the name you want to use.

    Note - Be careful not to edit the declaration so it is unrecognizable to JavaStar. The signature of all methods in the declarations file has to be:

    public static JSComponent name()

  4. Use the Find/Replace button to search the declarations for any additional instances of the declaration you changed, and update these too.

  5. Repeat Step 3 through Step 4 for the remaining component declarations.

  6. Click Save & Compile to create a .class file.

    Note - Whether you edit a JavaStar declaration file or not, you need to save and compile declarations after generating them.




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