Initialize the Configuration

To use batch mode you must initialize the configuration by opening at least one of the following:

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

The following lists the batch commands that you can use:

After initializing the configuration, you can then modify the current configuration for your specific requirements. See Set Standard Values and Set Other Configuration Values for the commands used to modify the current configuration.

Refer to Examples of Batch Commands for detailed examples of using these batch commands.

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;...

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 Exiting Work Directory

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

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.

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.

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 the Current Configuration

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

You can include batch 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: