When you open JavaStar, the Project tab of Project Settings is displayed to the forefront by default (see Figure 3-2). This panel shows you the name of the project file and has an editable text area--Description--where you can describe the purpose of the file.
Note - The project file name is shown as a display-only field. To change the filename, you need to use the Save As... button. See the section "Saving, Applying, and Loading Project Files."
By clicking on the tabs along the top of the Project Settings screen, you can bring other panels to the forefront. This section describes:
The App panel (Figure 3-3) is where you provide information about the program you want to test. For applications, you need to provide the name of the class file, any arguments the application requires, and the addendum to the CLASSPATH variable that JavaStar will use to locate the application. For applets, you need to provide the name of the HTML file that runs the applet.
To record or run a test, you do not have to provide this information in the project file. However, you can save yourself a lot of retyping if you enter the information here. If you will always be using the same application or applet in conjunction with this project file, or even if you will be using a particular program most of the time, go ahead and fill in the information here. When you later choose Create Test Script from the main menu, you'll have an opportunity to override these settings for that record/playback session.
To fill in application or applet information:
.class
extension.
The environment preferences affect the overall test environment. In the Test panel (see Figure 3-4) you define the directories you want JavaStar to use when generating tests and test results. You also define additional CLASSPATH
settings, time out values, and delay values.
Note - You can provide additional test options in the Adv. Test (Advanced Test) tab.
If you routinely store your tests in a directory other than the one where you start up JavaStar, type your test directory path in the Work directory field.
Field options:
Work directory | The default directory where JavaStar stores your JSTs, scripts, and gold directories for those scripts. |
Results directory | The default directory where JavaStar stores the log files any failure data (from failed comparisons), as generated by your script. |
JST path | The directories you want JavaStar to search when finding the JSTs necessary to run a JST. |
Test classpath | The path to the directory containing the tests you want to run. |
Time out |
The timeout value JavaStar uses when verifying comparisons and other JSComponent operations. When an operation fails, repeats its attempts until the timeout value is reached. By default, it is 30 seconds, but you can change it here.
|
Delay factor |
This value affects calls to JS.delay . If you recorded your script with delays, your script has JS.delay calls. When running a test script, JavaStar multiplies the delay factor by the JS.delay value defined in the script, and from there calculates the actual delay value.
For example, if the value of JS.delay is 100 (milliseconds) and the value in the Delay field is 0 , then the actual delay would be 0, but if the value in the Delay field is 2 , then the actual delay would be 200 milliseconds.
For more information about JS.delay , refer to the wrap(Component) description in the JavaStar API Reference.
|
In the Record panel of the Project Settings window, you can set recording format options and select optional events you want JavaStar to record.
The recording format options define how JavaStar generates code that uses components.
Your settings under Optional Events to Include determine whether JavaStar records certain types of events. By default, JavaStar records none of these events on this list. This is useful in cases where your application does not process particular events--for example, the MOUSE_MOVE
, MOUSE_ENTER
, and MOUSE_EXIT
events that are generated every time you move the mouse. If your application does process these events, then you should check the check boxes to activate this feature.
The Java panel (see Figure 3-6) in the Project Settings screen is where you define information on the Java virtual machine and the compiler you want JavaStar to use when running and compiling tests. Based on the location of the JDK, JavaStar provides default paths for the JVM and the compiler. If you plan to use these locations, you don't need to fill in the fields. You only need to provide a path if you want to override the default.
Use the Mapping panel (see Figure 1-7) to define the names and paths to:
If you use the Edit List... buttons to select files for these fields, JavaStar will automatically update the Classpath field with the paths to each file you choose. The section, "Using the Selection Dialog" explains how to select files using Edit List.
When you test an application created using a toolkit that does not extend java.awt.Component
, you need to provide JavaStar with a locator. This locator may be one you have written yourself or one provided with JavaStar. A locator is specific to a toolkit--for example, different locators are provided for Bongo, JFC, and IFC toolkits.
If you think your application or applet might need a locator, but you are unfamiliar with the locators available or don't know how to write one, see the chapter "Locators for Non-Components" for basic information. For an example of a locator and how you would use it, see the chapter, "Using Non-Component Locators" in the JavaStar Tutorial.
If you already have one or more locators to use with your program, you can use the Non component locators field (editing it with the Edit list... button) to specify the locators and have JavaStar add the location to the class path. For information on how to use the dialog that is displayed when you click Edit list..., see "Using the Selection Dialog."
If you plan to use declaration files to abstract GUI components, you need to provide the names of the declaration files and add them to the CLASSPATH
environment variable. You can do this in this panel, using the Edit list... button to the right of the Declaration classes field. After you add declaration classes to the list, JavaStar fills in the Declaration classpath field with the directory paths that correspond to the files you selected.
For information on how to use the dialog that is displayed when you click Edit list..., see "Using the Selection Dialog."
For step-by-step instructions on how to create declaration files, see the chapter, "Generating and Using Declarations" in this User's Guide. For a discussion of how to use declaration files within the JavaStar test model, as well as an example, see the chapter "Generating Declarations" in the JavaStar Tutorial.
Text map classes are utilities you write that map components to text names. If your application or applet uses bit-mapped images for components or if it uses lightweight components of a custom design, you may want to create a text map so that your tests can extract a meaningful name for the component. In cases such as these, a text map can make tests and results easier to interpret.
For information on how to develop a text map, see the chapter, "Text Map Classes."
To select files for either the Non component locators, Declaration classes, or Text map classes field:
Select Dialog (this one is for Non component locators)
For example, if you are selecting a locator, navigate to the javastar\contrib\locators
directory and select the locator you want.
The file name appears in the Edit list panel, in the Current Item field.
The file is displayed in the Path list panel and in the list box of Edit list.
If you have multiple files listed, you can move then up or down on the list, or delete them, using the buttons at the bottom of the Edit list panel.
JavaStar automatically enters the name of the class you selected into the text field for this file type, and the path to that class into Classpath field.
You can add additional locators using the Edit list... button.
The Adv. Test panel (Figure 3-9) provides advanced options for controlling tests. Here you can control:
Adv. Test Panel
Advanced test options:
Send feedback to
JavaStar-feedback@suntest.com
Copyright © 1998
Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303.
All rights reserved.