workdir or workdirectoryEach work directory is associated with a test suite and stores its test result files in a cache. You can use the work directory command to:
See Shortcuts to Initialize a Configuration for information about specifying a work directory in the command line.
To use an existing work directory for the test run, include either the workdir or workdirectory command in the command line:
> jtharness ... -workdir path/filename ... [task-command] ...
See About the Command-Line Examples for a description of the use of > jtharness in the example.
See Command-Line Overview for a description of the command line structure.
See Formatting a Command for descriptions and examples of the following command formats.
To create a new work directory for the test run, use the -create command option:
> jtharness ...
-workdir -create path/filename [configuration-command] ... [task-command] ...
See About the Command-Line Examples for a description of use of > jtharness in the example. See Command-Line Overview for a description of the command line structure.
The new work directory must not previously exist. You can also use an existing work directory as a template to create a new work directory for the test run. To use an existing work directory as a template, put the template in the command line before the
create command.
When creating the command string, include the commands in the following sequence:
See Specifying a Test Suite With
testSuitefor detailed information about the command.
-workdir path/filename command
required to specify an existing work directory.workdir or workdirectory -create path/filename command.See Specifying a Configuration File With
configfor detailed information about the command.
See Setting Specific Values for detailed information about the available commands.
runtests command.The results of the test run are written to the new work directory. See Running Tests With
runtestsfor detailed information about the command.
In the following example, myworkdir.wd and myconfig.jti represent file names that might exist on your system.
Command Options Format Example:
> jtharness -workdir myworkdir.wd -create testrun.wd -config myconfig.jti -runtests
When the tests are run, the harness uses the work directory (testrun.wd) created by the command line, even if the configuration file (myconfig.jti) was created using another work directory.
See Formatting a Command for descriptions and examples of other command formats that you can use.
When you replace an existing work directory with a new work directory, the harness performs the following tasks:
To replace an existing work directory with a new work directory, use the -overwrite command option.
> jtharness ... -workdir -overwrite path/filename ... [task-command] ...
or
> jtharness ... -workdir -create -overwrite path/filename ... [task-command] ...
The -create command option is optional when the -overwrite command is used.
See About the Command-Line Examples for a description of use of > jtharness in the examples.
See Command-Line Overview for a description of the command-line structure.
In the following example, myconfig.jti represents a configuration file name that might exist on your system.
Command Options Format Example:
> jtharness -workdir -overwrite testrun.wd -config myconfig.jti -runtests
The harness uses the work directory testrun.wd created by the command line when the tests are run, even if myconfig.jti was created using another work directory.
See Formatting a Command for descriptions and examples of other command formats that you can use.
Copyright © 2004, 2011, Oracle and/or its affiliates. All rights reserved.