READMESigTest™ ToolVersion 2.0April 2008 |
This README
contains basic information about SigTest tool
Version 2.0. See the SigTest Tool User's Guide for more information.
The SigTest tool assists a developer in developing and running a signature test to be included in a finished test suite.
It operates based on the following principles:
The following environment settings and components must be set in order to run SigTest tool:
The SigTest tool, version 2.0 release is the initial open source distribution. The open source release is based on Sun Microsystem's SigTest tool, version 2.0.
To install the SigTest tool, unzip the distribution into a directory of your choice.
Unpacking the Zip bundle installs subdirectories under the base installation directory as described in Release Contents. See the SigTest Tool 2.0 User's Guide for detailed information on how to configure the SigTest tool for your system.
This section lists the components under the base subdirectory structure (SigTest-2.0/
)
that is created when you unzip the SigTest tool distribution archive during
installation.
Component | Description |
---|---|
README.html | The SigTest tool README document (this document). |
lib/sigtestdev.jar |
The entire class archive that is necessary to run all the tool commands used to develop a signature test. |
lib/sigtest.jar |
A subset of the files in the sigtestdev.jar file, used for just running the signature test, usually from within a test suite with the JavaTest harness. You include this file in a finished test suite. |
lib/remote.jar |
The classes necessary to create the remote class loader used to develop distributed extensions. These classes are Connected Device Configuration 1.0 compatible. |
examples/ |
Contains the sample test suite files used for the SigTest tool usage examples. |
legal/ |
Contains text describing license and copyrights that apply to this project. |
The SigTest tool operates from the command line with the following commands.
Setup
command creates a signature file
from either an API defined by a specification or a reference API
implementation. A signature file is a text representation of the set of
public and protected features provided by an API. Test suite developers
include it in a finished test suite as a signature reference for comparison to
the technology implementation under test.SignatureTest
command compares the
reference API represented in the signature file to the API under test
and produces a report. This is the actual test that becomes part of a
finished test suite.SetupAndTest
command runs only in static
mode, described later, to execute the Setup
and SignatureTest
commands in one operation.Merge
command creates a combined signature
file from several signature files representing different Java APIs in one Java
runtime environment according to the JSR 68 rules.
This section contains simple examples showing how to start the
SigTest tool from the command line using the Setup
and
SignatureTest
command line options. See System Requirements for initial setup.
Example 1: The following command line runs
the Setup
command to create a signature file named result.sig
:
java -cp sigtestdev.jar com.sun.tdk.signaturetest.Setup -static
-classpath $JAVA_HOME/jre/lib/rt.jar -filename result.sig -package
java.text
Example 2: The following command line runs
the SignatureTest
command to manually run a signature test:
java -cp sigtest.jar com.sun.tdk.signaturetest.SignatureTest
-static -filename result.sig -classpath $JAVA_HOME/jre/lib/rt.jar
-package java.text
This section describes the SigTest tool operating modes and report messages.
The following two run modes are available during command execution, each associated with how the class descriptions are examined and retrieved:
SignatureTest
commands, it uses reflection to examine API classes and retrieve
information about them. The reflection mode is of greatest advantage
when the API to be analyzed has no external class files.-static
option,
the tool parses only the class files listed in the -classpath
command-line argument. You normally use static mode when a reflection
mechanism is not supported, or in a security-constrained environment
that disallows checking required attributes. Static mode
is useful for testing specified classes in another runtime environment. The Setup
and SetupAndTest
command run only in static mode.Report messages can (by default) be either sorted or unsorted. They contain the following types of information:
See the SigTest Tool Version 2.0 User's Guide for hands-on procedural examples of running the tool.
Copyright © 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. .