Using JavaTest Agents

When you run tests on a platform other than the one running the JavaTest harness, you must use an agent. The agent runs the tests on the test platform and communicates with the JavaTest harness.

The JavaTest harness provides a JavaTest Agent that you can use. The JavaTest Agent is a lightweight program compatible with JDK 1.1, and does not use J2SETM or Swing. If your test suite provides another agent, please refer to your test suite documentation for information regarding its use.

The JavaTest Agent uses a bidirectional serial connection to communicate between the test platform and the JavaTest harness that supports both the TCP/IP and RS-232 protocols.

Other types of serial connections can be added through the JavaTest API, for example, infrared, parallel, USB, firewire connections can be added and modeled on the existing serial system.

To use the JavaTest Agent, a test platform must meet the following minimum requirements:

If your test platform does not meet these requirements, you can use the JavaTest API to create a custom agent.

Loading the JavaTest Agent

Before running the JavaTest Agent on your test platform you must do two things:

  1. Load the agent classes on your test platform.
  2. Set the class paths for your test platform.

Load the Classes

Refer to doc/javatest/classDepLists in the JavaTest harness for the .lst files containing the minimum set of classes required by the JavaTest Agent.

The classes required by the JavaTest Agent are located in the javatest.jar file. There are three ways you can load the classes required by the agent:

Set the Class Paths

Using agents to run tests requires several Java Virtual Machines, each having at least one class path. The tests, the agent, and the JavaTest harness use separate class paths. Placing classes on the wrong class path is the most common error in setting up a test platform to use an agent. Minimizing the number of items on the class paths increases the reliability of the test run.

For the JavaTest Agent, set the class path as specified in your Java Runtime Environment (JRE) documentation.

For the tests, set the class path as specified in your test suite documentation.

The topics in this chapter describe how to run a JavaTest Agent. This chapter contains the following sections:

imageStarting JavaTest Agents
Synchronizing the JavaTest Harness and Agents
Monitoring JavaTest Agents
Stopping JavaTest Agents
Troubleshooting JavaTest Agents