Setting Specific Configuration Values

You can use the setcommand to override a specific value in the current configuration (.jti) file:

> javatest ... [initial set-up commands] ... -set question-tag-name ... [task command] ...

See About the Command-Line Examples for a description of use of > javatest in the example.

You can also use -set -file input-file-name or -set -f input-file-name to import a Java properties file containing the values of multiple configuration questions. A hand edited configuration file can be used as an input file.

> javatest ... [initial set-up commands] ... -set -file input-file-name ... [task command] ...

The JavaTest harness uses the values in the input file to override the values in the configuration. Any values in the input file that are not used in the configuration are ignored.

Values changed by the setcommand are only used for the session and override but do not change the configuration file. To change a configuration file, use the Configuration Editor window provided by the JavaTest harness GUI.

When creating a command string to set specific values in a configuration, include the commands in the following sequence:

  1. Set up a configuration
  2. Specify configuration values (set question-tag-name value)
  3. Include the runtestscommand (optional).

See Command-Line Overview for a description of the command line structure.

To use the setcommand, you must identify the question-tag-name associated with the value in the configuration file that you are changing. In the command line, following the setcommand, enter the question-tag-name and its new value:

A value can only be changed if its tag-name exists in the initialized configuration file. If the configuration does not include the tag-name you must use the Configuration Editor in the JavaTest harness GUI to include the question and value in the configuration file.

See Obtaining the Question tag-name for detailed information about the tag-name for the question. See Formating Configuration Values for editJTI or -set for detailed information about formatting the values. See Detailed Examples for examples of using the set command and the tag-name.

Detailed Example of Setting Test Suite Specific Values

In the following example, myconfig.jti represents a file name that might exist on your system.

Command Options Example:

> javatest -config myconfig.jti -set jckdate.gmtOffset 8 -runtests

See Formatting a Command for descriptions and examples of other command formats.