Monitoring Results with HTTP Server

The JavaTest harness provides a small web server that you can use to remotely monitor and control a test run. The HTTP Server provides two types of output:

HTML Formatted Output

The HTML formatted output is provided as human readable pages (these pages are subject to change in future releases of the JavaTest harness), allowing users to remotely monitor batch mode test runs in a web browser and stop any test runs that are not executing as expected:

Accessing HTTP Server HTML Formatted Output

  1. Use the following command on the command line to activate the web server. Include the path of the directory [jt_dir] where the javatest.jar file is installed. The javatest.jar file is usually installed in the TCK lib directory when the JavaTest harness bundled with a TCK:

    java -jar [jt_dir]/javatest.jar -startHttp -batch [options]

  2. Copy the URL reported to the console:

    Example:
    JavaTest HTTPd - Success, active on port 1903
    JavaTest HTTPd server available at http://129.145.162.75:1903/

  3. Launch a web browser and enter or paste the URL in the browser URL field:

    Example:
    http://129.145.162.75:1903/

Viewing HTTP Server Index Page

The root of the web server provides an index page that only lists the handlers registered with the internal web server; not all available URLs on the server. You can also display the HTTP Server Index page by including /index.html at the end of the URL in the browser URL field:

Example:
http://129.145.162.75:1903/index.html

Each JavaTest harness has it's own handler, identified by a unique number as the second component of the URL.

Viewing HTTP Server Harness Page

When the JavaTest harness is running tests, the harness page displays:

In addition to the list of registered handlers, the page also prints the UTC/GMT date on which that page was generated (subject to the system clock on the machine which JavaTest is running) and provides the JavaTest version number and build date.

You can display the HTTP Server Harness page by choosing its link on the index page or by including /harness at the end of the URL in the browser URL field:

Example:
http://129.145.162.75:1903/harness

Viewing HTTP Server Test Result Index Page

The Test Result Index page displays:

The total number of tests is also a link to view the current test results. The test results are displayed in a two column table, by test name and status message.

You can display the Test Result Index page by choosing its link on the harness page.

Viewing the Harness Environment Page

The Harness Environment page displays the environment information provided to the JavaTest harness and used in the current test run. The environment information is displayed in an HTML table and provides a view of the current settings.

You can display the Harness Environment page by choosing its link on the harness page or by including /harness/env at the end of the URL in the browser URL field:

Example:
http://129.145.162.75:1903/harness/env

Viewing the Harness Interview Page

The Harness Interview page displays the configuration interview provided to the JavaTest harness and used in the current test run.

You can display the Harness Interview page by choosing its link on the harness page or by including /harness/interview at the end of the URL in the browser URL field:

Example:
http://129.145.162.75:1903/harness/interview

Using HTTP Server to Stop a Test Run

If you want to remotely terminate a test run for any reason, you can use the HTTP server. Include /harness/stop at the end of the URL in the browser URL field:

Example:
http://129.145.162.75:1903/harness/stop

To stop the test run, you must click the STOP button on the page displayed in the browser.

Plain Text Output

The HTTP server provides plain text output that can be used for automated monitoring of the JavaTest harness during test runs. The plain text output does not include HTTP headings or HTML formatting and is intended for use by automated testing frameworks, not for viewing in web browsers. Consequently, future releases of the JavaTest harness will attempt to maintain the content formatting and URLs of this output.

Two types of JavaTest information can be accessed by automated testing frameworks:

Accessing Version Information

The HTTP Server Version page displays version information about the JavaTest harness. You can display the HTTP Server Version page by choosing its link on the index page or by including /version at the end of the URL in the browser URL field:

Example:
http://129.145.162.75:1903/version

A dump of the version information is provided.

Example:
JavaTest 3.0.3 Built on 06 Feb 2002

Accessing Harness Information

The following strings access specific information about the JavaTest harness: