Initializing a Configuration

To perform operations in the command mode, you must first initialize a configuration. You can initialize a configuration by opening at least one of the following:

See Shortcuts to Initialize a Configuration for additional information about specifying a test suite and work directory in the current configuration.

Commands Used to Initialize a Configuration

You can use any of the following commands to initialize a configuration:

After initializing a configuration, you can then modify it for your specific requirements. See Setting Standard Values and Setting Test Suite Specific Values for the commands used to modify the current configuration.

The command format used in the following examples is the single string arguments format. See Formatting a Command for a description and example of the other command formats that you can use.

open

Opens a test suite, work directory, parameter .jtp file, or a configuration .jti file. The .jtp files are supported for older test suites that do not use a configuration editor and .jti file.

Example:

...;open test_workdir.wd;...

testSuite

Specifies the test suite that is run.

Example:

...;testSuite sampleTestSuite;...

workDir or workDirectory

Each work directory is associated with a test suite and stores its test result files in a cache. You can use the workdirectory command to open an exiting work directory, create a new work directory, or replace an existing work directory with a new work directory.

Open an Existing Work Directory

To open an existing work directory for the test run, use either the workDir or workDirectory command.

workDir or workDirectory

Example:

...;workDirectory sampletest;...

Create a New Work Directory

To create a new work directory for the test run, use the -create command option. The new work directory must not previously exist.

workDir -create or workDirectory -create

Example:

...;workDirectory -create sampletest;...

Replace an Existing Work Directory with a New Work Directory

When you replace an existing work directory with a new work directory, the JavaTest harness:

  1. Deletes the existing work directory and its contents.
  2. Creates the new work directory using the same name (if the old directory was successfully deleted).

To replace an existing work directory with a new work directory, use the -overwrite command option. The -create command option is optional when the -overwrite command is used.

workDir -create -overwrite or workDirectory -create -overwrite

Example:

Replace the existing sampletest work directory with a new sampletest work directory.

...;workDirectory -overwrite sampletest;...

or

...;workDirectory -create -overwrite sampletest;...

Shortcuts to Initialize a Configuration

The following apply to the test suite, work directory, and .jti file specified in a command:

You can include commands as any combination of options, single string arguments, or files on the command line. However, because commands are executed in the sequence that they appear in the command string, if specified: