Starting JavaTest Agents

After loading the required JavaTest Agent classes on your test platform, you can start the agent as an application or as an applet.

Starting an Agent as an Application

When starting an agent as an application, you can run it either as a GUI-based application or as a command-line application. However, if you are using a test platform that does not support AWT, you must start the agent as a command-line application.

GUI-Based Application on Unix Compatible Platforms

Start the agent from the directory in which the JavaTest harness is installed:

java com.sun.javatest.agent.AgentFrame [options]

You can also use the wrapper script with -agent as the first option:

javatest -agent [options]

GUI-Based Application on WIN32 Platforms

Use the Command Prompt console to start the agent from the directory in which the JavaTest harness is installed.

Example:

c:\>java com.sun.javatest.agent.AgentFrame [options]

You can also use the wrapper script with -agent as the first option.

Example:

c:\> javatest -agent [options]

Command-line Application on Unix Compatible Platforms

Start the agent from the directory in which the JavaTest harness is installed:

java com.sun.javatest.agent.AgentMain [options]

Command-line Application on WIN32 Platforms

Use the Command Prompt console to start the agent from the directory in which the JavaTest harness is installed.

Example:

c:\>java com.sun.javatest.agent.AgentMain [options]

Command-line and GUI-based Application Options

When starting an agent as a command-line or a GUI-based application, you can use options to:

Starting an Agent as an Applet

Start an agent as an applet by using a web browser to open an HTML page containing the required applet and parameter tags. Two sets of tags are used in an agent applet:

Use the <APPLET> or <OBJECT> tag supported by your browser. The following example code uses the <APPLET> tag.

Example:

<APPLET
code=com.sun.javatest.agent.AgentApplet
codebase=JavaTest-classes
width=display-width
height=display-height
>

<param name=option-name value=option-value>
.
.
.
<param name=option-name value=option-value>
</APPLET>

Applet parameters

The APPLET or OBJECT tag contains attributes that set the parameters required for the applet to run.

code The name value pair, code=Applet-class, set the location and class name for the agent applet.

code=com.sun.javatest.agent.AgentApplet

codebase The name/value pair, codebase=JavaTest-classes, set the URL for the JavaTest classes. The URL either provides the location of the javatest.jar file or, if the javatest.jar file was unpacked, JavaTest classes directory.

Example:
codebase=javatest3/javatest.jar

width The name/value pair, width=display-width, sets the width of the applet. An initial value of 600 is suggested; however you may need to adjust the value based on your screen size and resolution.

Example:
width=600

height The name/value pair, height=display-height, sets the height of the applet. An initial value of 600 is suggested; however you may need to adjust the value based on your screen size and resolution.

Example:
height=600

Applet options

Agent parameters are optional and can be included in the applet as a <param> tag or, with the exception of the trace parameter, can be set from the agent window after the applet is running.

Each <param> tag contains a parameter name value pair. Agent parameters defined in the <param> tag specify how the agent runs.

Agent parameters can be included in an applet to:

imageRelated topics:

imageSynchronizing the JavaTest Harness and Agents
Monitoring JavaTest Agents
Stopping JavaTest Agents
Troubleshooting JavaTest Agents