After loading the required JavaTest Agent classes on your test platform, you can start the agent as an application or as an applet.
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.
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]
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]
Start the agent from the directory in which the JavaTest harness is installed:
java com.sun.javatest.agent.AgentMain
[options]
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]
When starting an agent as a command-line or a GUI-based application, you can use options to:
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:
<APPLET>
or <OBJECT>
tag (required)
<param>
tags (optional)
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>
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.
|
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: |
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: |
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: |
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:
Related topics: