|JavaTest Harness Architect's Guide,
JavaTest Harness 4.5 for the Java Platform
A Technology Compatibility Kit (TCK) is a test suite and a set of tools used to certify that an implementation of a Java technology conforms both to the applicable Java platform specifications and to the corresponding reference implementations — the end result is a Java technology that is certified as compatible. The architect designs test suites to exercise assertions described in the technology specifications. TCK test suites may use the JavaTest harness for test execution and test suite management tools.
As the test suite architect, it is your job to design the framework for the test suite, and if necessary, create custom plug-in components required to implement the design.
Each TCK that you design should be composed of the following:
Test suite: A collection of tests that fit within a common framework. The framework is typically designed by the architect — the individual tests are designed to work within the framework and are usually written by a team of test suite developers.
Configuration interview: To run the tests in a test suite, the JavaTest harness requires site-specific information about the computing environment, such as the location of the Java launcher, and the Java technology being tested. The JavaTest harness provides the means to collect this information based on an interview that you provide.
Documentation: A well documented TCK generally includes the following information, provided by the architect:
Test Suite User's Guide: Contains instructions about how to start and run the tests and rules for certification. The Java Compatibility Test Tools (JCTT) release contains a TCK User's Guide Template that can serve as the basis for this document.
Configuration editor "More Info" text: Provides explanation and examples for each question in the configuration interview
Architects design test suites and the characteristics of the various tests, but are not typically concerned with the specific details of individual tests. That is the task of test suite developers (see the Test Suite Developer's Guide). Architects design the framework in which the individual tests fit.
This document describes the tasks associated with the TCK architect.
It is extremely important to note that the JavaTest installation and runtime system is fundamentally a developer system that is not specifically designed to guard against any malicious attacks from outside intruders. If sample code or tests you author make a network call, you can expose the JavaTest operating environment during execution. For this reason, it is critically important to observe the precautions outlined in the following security guidelines when installing and running JavaTest.
The harness itself is self-contained in
javatest.jar. The only external dependency is
jh.jar, which should be placed either on the classpath or in the same directory as
javatest.jar. If desired, the following optional parts of the binary distribution can be deleted:
win32 each contain a subdirectory named bin, which contains a script named javatest. All of these directories and files are provided for convenience and can be deleted without harm. (If the
javatest launch script is deleted you can start the harness by pointing a JVM at the
Examples in the
Documentation in the
lib/jt-junit.jar which is an optional binary component.
To maintain optimum network security, JavaTest can be installed and run in a "closed" network operating environment, meaning JavaTest is not connected directly to the Internet, or to a company Intranet environment that could introduce unwanted exposure to malicious intrusion. This is the ideal secure operating environment when it is possible.
JavaTest does not require an Intranet connection that supports network connections to systems outside the JavaTest architecture to intra-company resources, but, for example, some Java ME applications in a test suite might use an HTTP connection. If JavaTest or applications launched from JavaTest are open to any network access you must observe the following precautions to protect valuable resources from malicious intrusion:
Install JavaTest behind a secure firewall that strictly limits unauthorized network access to the JavaTest file system and services. Limit access privileges to those that are required for JavaTest usage while allowing all the I-directional local network communications that are necessary for JavaTest functionality. The firewall configuration must support these requirements to run JavaTest while also addressing them from a security standpoint.
Follow the principle of "least privilege" by assigning the minimum set of system access permissions required for installation and execution of the JavaTest.
Do not store any data sensitive information on the same file system that is hosting JavaTest.
To maintain the maximum level of security, make sure the operating system patches are up-to-date on the JavaTest host machine.
examples directory contains example test suites that are used throughout this book in tutorials to illustrate how tests and test suites are constructed. This manual uses these examples to supplement feature discussions.
...\examples\ javatest\ demoapi\ demoapi sample files. README.html explains the directory contents. api\ API classes tested by the Demo TCK test suite src demoapi source files demoapi.jar API classes tested by the Demo TCK test suite interviewDemo\ A self-documenting configuration interview demo demotck\ The test suite used to run the interview demo src The interview demo source files simpleHTML\ demotck\ Demo test suite that uses HTML-based test src Demo TCK configuration interview source files simpleTags\ demotck\ Demo test suite that uses HTML-based test src Demo TCK configuration interview source files sampleFiles\ Miscellaneous sample source files in this manual.
Unless otherwise indicated, all examples in this book use Microsoft Windows style command prompts and file separators.