JavaStar from the Command Line: Using Command Line Flags


Each of the playback features provided by the JavaStar GUI can be set through command line flags. The best way to see how this works is to map a test run to a command line sequence.

In the GUI, you can define a test run that:

You can do this in the Run Test window by:

At the command line, you would specify the same test run by typing:

This command line sequence sets each of these options. The order is only loosely defined; the -testargs flag must always fall at the end, but the other options can be defined in any order. The commands set the options as follows:

Command Description
java javastar Starts JavaStar.
-play Sets the mode to playback
-gui Sets JavaStar to display the JavaStar GUI and the application under test during the test run.
-jst Acceptance.jst Specifies that you are running a JST and the name is Acceptance.jst.
-log accept.log Sets the logfile to accept.log. If you didn't set this, the log filename would default to Acceptance.jst.log.
-testargs "Name"
"Address 1" "Address 2" "Phone" "Email"
"Other" "test.db"
Passes the specified arguments to the test.

JavaStar provides controls that correspond to playback options, as well. These options are useful for controlling the environment in which the test runs. For example, the delay (-scale) and time out (-timeout) options are helpful when you run a test on a platform that has a slower response time than the system used to record the test. If your test involves interaction with a canvas, delay times can be critical to getting a proper response. But even if you recorded with delays on, your test might be too fast on a very slow system.

By scaling the delay factor up--increasing delay times--and by increasing the timeout value, you allow the system extra time to respond to the test events. This provides you with the flexibility you need to test in a wide range of environments.




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