Starting the Agent in Active or Passive Mode

When starting an agent as an application or as an applet, you can specify its mode:

Passive Mode The JavaTest harness initiates connections to a passive agent as needed. Passive agents are simpler but less flexible because they require you to specify the test machine as part of the test configuration - not at the time you run the tests. Passive agents do not allow you to run tests in parallel.
Active Mode Active agents initiate connections to Java Test as available. Active agents allow you to run tests in parallel using many agents at once. Active agents allow you to specify the test machines at the time you run the tests.

Unless your decision is dictated by security restrictions on your platform, active agents are recommended. If the security constraints of your Java platform prevent incoming connections you must use active agents.

Application Option

When starting an agent as an application, you must set it to run in active or passive mode. Use the following option on the command line, or if you are starting a GUI agent, you can also set this option from the GUI.

-active Use -active in the command string to start an agent in active mode.

Active agents must contact and register with the JavaTest harness on the system specified by the -activeHost and -activePort options before they can run tests.

-passive Use -passive in the command string to start an agent in passive mode.

Passive agents must wait for a request from the JavaTest harness before they can run tests. The passive agent listens for the request on the port specified by the -passivePort option.

Applet Option

When starting an agent as an applet, you can use the following param tags in the applet to set whether it runs in active or passive mode, or you can set this option from the GUI.

active To start an agent in active mode, include the active parameter in the applet:

<param name=mode value=active>

Active agents must contact and register with the JavaTest harness on the system specified by the activeHost and activePort parameters before they can run tests.

passive To start an agent in passive mode, include the passive parameter in the applet:

<param name=mode value=passive>

Passive agents must wait for a request from the JavaTest harness before they can run tests. The passive agent listens for the request on the port specified by the passivePort parameter.