Starting the JavaTest Harness

When you start the JavaTest harness you must specify which of two modes to use:

When starting the JavaTest harness, you should use the mode that best suits your test environment and implementation.

You can also use the command-line mode to specify or pre-configure how the JavaTest GUI starts. For example, if your test group provides an existing test configuration or configuration template in a central location, you can use the command-line mode to start the JavaTest GUI using that configuration.

GUI Mode

In GUI mode the JavaTest harness provides you with an integrated set of interactive windows and controls to:

You should start the JavaTest harness from the writable directory where you intend to create files and store test results. Refer to your test suite documentation for specific information about starting the JavaTest harness for your test suite.

Generally you can use any of the following actions to start the JavaTest harness in GUI mode:

Action Description
Run a Startup Script Use a startup script if your test suite includes one. Refer to your test suite documentation for details about using a startup script.
Execute the JAR File If you have access to a command line, you can directly execute the .jar file from the directory where you intend to create files and store test results:
  1. Make the directory where you intend to create files and store test results your current directory.
  2. At the command prompt, type:

    java -jar [jt_dir/lib/]javatest.jar

You must include the path of the directory where the javatest.jar file is installed (represented as [jt_dir/lib/] in the example). The javatest.jar file is usually installed in the TCK lib directory when the JavaTest harness is bundled with a TCK.

Double-click the icon If you are using a GUI, your system may support double clicking the javatest.jar file icon to launch the harness.
Invoke the class directly If you have access to a command line and the jar file is on the class path, you can directly invoke the class from the directory where you intend to create files and store test results by making it the current directory and then, at the command prompt, typing:

java com.sun.javatest.tool.Main

Unless you are starting the harness for the first time or use a command-line option, the JavaTest harness restores your previous desktop when it starts the GUI. See Specifying JavaTest Options for information about options that you can include in the command string when starting the JavaTest harness.

The JavaTest harness also allows you to specify the status colors used in the GUI. This property is set on the command line as a system property when starting the JavaTest GUI. The JavaTest uses these color prefences when restoring your desktop in subsequent JavaTest sessions.

When the JavaTest harness cannot restore an existing desktop, it displays a Welcome dialog box that guides you through the startup. See Welcome Dialog Boxes for a detailed description of using the Welcome dialog box to start the JavaTest harness in GUI mode.

Command-Line Mode

In command-line mode, you can use the JavaTest harness as part of an automated process to run tests, write reports, or audit tests. You can also use the command-line mode to specify or pre-configure how the JavaTest GUI starts.

See Command-Line Operations for a detailed description of running the JavaTest harness in command-line mode.

The following text is a note
While you must use the JavaTest GUI to create a configuration file, you can edit or modify any existing JavaTest configuration file as part of an automated process or as part of the command line used to start a test run. See Editing Entries in a Configuration File for detailed information.