Starting an Agent Applet

Before you can start an agent applet, the required classes must be installed on your test system. Refer to Installing Agent Classes on Test Systems for the location and list of classes required to start the agent applet.

  1. If an HTML page containing the required applet is not available, create it in your test suite root directory. Refer to Agent Applet Tag below for a detailed description of an applet tag.
  2. Use a web browser to open an HTML page containing the agent applet tag. The applet tag must be compatible with your browser's VM.
  3. Use the Parameters tabbed pane to configure and run the agent:

Agent Applet Tag

Because some browsers use built-in VMs to run applets, you must use a compatible applet or object tag. Refer to your VM documentation for a description of the tags required to run applets on your browser.

The following example is compatible with the Netscape browser VM. It calls the agent applet and sets the parameters of the applet GUI.

Agent parameters and run options can also be set in the applet tag. Refer to Setting Parameters in the Applet Tag below.

Example agent applet tag:

      <APPLET/ 
      code=applet-class-path/ 
      archive=JavaTest-classes/ 
      width=display-width/ 
      height=display-height/ 
      >
      Applets have not been enabled 
      on your browser. You must enable 
      applets on you browser to display 
      the applet GUI used to run the agent. 
      </APPLET>

The following table describes the tags used in the applet:

Tag Description
code The agent applet class installed on your test system.

Example:

code=com.sun.javatest.agent.AgentApplet

archive The URL of the classes required to run the agent applet on your test system. The classes are either located in the javatest.jar file or in a directory containing the minimum set of classes required to run the agent applet.

In the following example, the classes are contained in the javatest.jar file located in the same directory as the HTML page. Refer to Installing Agent Classes on a Test System for a description of how the agent applet classes can be installed.

Example:

archive=javatest.jar

width Sets the width of the GUI. An initial value of 600 is suggested; however, adjust the value based on your screen size and resolution.

Example:

width=600

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

Setting Parameters in the Applet Tag

Parameters can also be set in the applet tag. Parameters in the applet tag are included as <param name/value> pair tags:

Example agent applet tag:

      <APPLET 
      code=applet-class-path 
      archive=JavaTest-classes 
      width=display-width 
      height=display-height 
      >

...
<param name=parameter-name value=parameter-value>
Applets have not been enabled on your browser. You must enable applets on you browser to display the applet GUI used to run the agent. </APPLET>

Two types of parameters can be included in the applet tag: