Before you can start an agent application, 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 directly from the command line or using the application GUI. Complete the following actions to start an agent application:
If the agent pool is not listening when an active agent starts, the agent cannot contact the harness. The agent returns an error message and then waits until its timeout period ends before recontacting the JT Harness harness.
java -cp
classpath [application class] [options]
-cp
option sets the classpath required to run the agent. Use
the ; or : separator appropriate for your test system when more than one class
path is included in the command string. Refer to
Class Paths for detailed descriptions of the classes that your agent requires. Example:
java -cp /lib/javatest.jar com.sun.javatest.agent.AgentFrame
You must include the path of the javatest.jar
file (represented as /lib/javatest.jar
in the example). The javatest.jar
file is usually installed in the test suite lib
directory when the JT Harness harness is bundled with a test suite.
If you are using the application GUI to run the agent, use the Parameters tabbed pane to verify the agent settings and start the agent.
The following topics provide detailed information about agent parameter settings:
The following table describes the classpaths that are required in the command line.
Classes | Description |
---|---|
Agent |
The location of the agent classes installed on your test system.
The agent classes are either located in the
Some test suites include additional .jar files containing classes needed for an agent to run tests. These |
Test | Test classes are located in the classes directory of the test suite. |
The most common error made when setting up a test platform to use an agent is entering the wrong classpaths in the command string. Configuring your test platform to use the simplest classpaths increases the reliability of the test run.
An application class is required in the command line to run the agent. The following table describes the two application classes.
Mode | Application Class |
---|---|
No GUI |
com.sun.javatest.agent.AgentMain options
Used when the agent GUI is not wanted or not available. In this mode, all options must be fully specified on the command line. The agent automatically starts when the Return key is pressed. Refer to Agent Options for the options that are included on the command line. |
With GUI |
com.sun.javatest.agent.AgentFrame options
Used to start the agent GUI. In this mode, options might either be given on the command line or in the agent GUI. The agent GUI is used to start and stop the agent. Refer to Agent Options for the options that are included on the command line. |
The following table describes the two types of options used in the command line.
Type of Option | Description |
---|---|
Agent parameters |
Set the parameters for the type of agent that you are using. See the following
topics for additional information:
If you are using the command-line application class (
If you are using the GUI application class ( |
Additional parameters |
Display help, run the agent, or configure other agent properties.
Refer to Specifying Additional Agent Options for a description of the additional parameters that can be set. |
Copyright © 2002, 2011, Oracle and/or its affiliates. All rights reserved.