# Release Notes ## SigTest ## Version 2.2 ## March 2011

[Skip TOC]

## Table of Contents

Introduction
New in This Release
System Requirements
Documentation
Release Contents
Installation
Using the Signature Test Tool
Using the API Coverage Tool
Known Bugs and Issues

## Introduction

These release notes contain information about version 2.2 of the SigTest tools. See the SigTest 2.2 User's Guide for more information about the tools.

The SigTest product is a collection of tools that can be used to compare APIs and to measure the test coverage of an API. The tools were originally created to assist in the creation of Java technology compatibility test suites (TCKs), but are also useful in the creation of other types of test suites and in the software development process. The SigTest product consists of the following three tools.

- The Signature Test tool makes it easy to compare the signatures of two different implementations or different versions of the same API. When it compares different implementations of the same API, the tool verifies that all of the members are present, reports when new members are added, and checks the specified behavior of each API member. When it compares different versions of the same API, the tool checks that the old version can be replaced by the new one without adversely affecting existing clients of the API.

- The API Coverage tool can be used to estimate the test coverage a test suite provides for an implementation of a specified API. It does this by determining how many public class members the test suite references within the API specification. The tool uses a signature file representation of the API specification as the source of specification analysis. It does not process a formal specification in any form.

- The API Check tool tracks API changes and checks for source and binary compatibility. Much like Signature Test tool, it compares the reference implementation of an API recorded as golden signature file with a tested implementation. Unlike Signature Test tool, which requires that all classes (and the classes they depend on) be specified to the tool, API Check tool does not require dependencies to be specified. For that reason, API Check tool is faster than Signature Test tool, but less rigorous.

## New in This Release

The following new features have been added and the following bugs have been fixed.

### New Features

- Added API Check tool
- Added Apache Maven wrappers
- Added upcoming Java 8 features support

This release of SigTest also includes the following improvements:

Bug/RFE | Description
--- | ---
SIGTEST-9 SIGTEST-44 | Support for non-static constants
SIGTEST-49 | Option files
SIGTEST-45 | API Cover - signature files with markup
SIGTEST-57 | Support for separator-delimited parameters
SIGTEST-48 | Plugin API extended
N/A | Improvements in reflection mode
SIGTEST-51 | API Cover accepts non-closed signature files in real mode
N/A | Optional copyright notices in signature files

### Fixed Bugs

The following bugs have been fixed.

Bug/RFE | Description
--- | ---
SIGTEST-28 | Constant checking should be turned on by default in reflection mode
SIGTEST-50 | Missing support for RuntimeInvisibleParameterAnnotations
SIGTEST-52 | StringIndexOutOfBoundsException when parsing annotations
SIGTEST-53 | SigTest doesn't catch conflicts with a field came from private interface
SIGTEST-54 | Bogus sigtest failure E1.3 when making abstract class constructor protected
SIGTEST-58 | Sigtest should process names with dollar sign
SIGTEST-59 | Setup does not warn if superinterface for a class excluded
N/A | API Cover failed to run if utilized signature file is more narrow than API under review
N/A | In some cases sigtest fails in debug mode when running with -ea
N/A | BinaryClassDescrLoader doesn't close InputStream(s)
N/A | Merge procedure lose classes
N/A | Signature file writer is not thread safe
N/A | Constructor names in signature files
N/A | APICheckMode started to allow supersetting API

## System Requirements

Using the SigTest tools requires a properly configured certified Java Platform, Standard Edition (Java SE™ platform) runtime environment version 1.4 or later, or a Java SE platform 5.0 runtime environment if using reflection to test version 5.0 and later class files. A properly configured JDK™ installation is required to compile the examples.

## Documentation

The SigTest 2.2 User's Guide is available in the `doc/` directory in both PDF and HTML format.

## Installation

To install SigTest, unzip the distribution into a directory of your choice. For example, at a UNIX® system prompt type the following command:

`% unzip sigtest-2.2.zip`

Unpacking the Zip bundle installs subdirectories under the base installation directory. For more information, see the Release Contents section below and the documents listed under "For SigTest contributors" in the Quick Links box on the front page of the SigTest Project website.

## Release Contents

This section lists the components under the base subdirectory structure (`SigTest-2.2/`) that is created when you unzip the SigTest distribution archive during installation.

[Top]

### Component Descriptions and Locations

Component | Description
--- | ---
`ReleaseNotes.html` | The SigTest release notes (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/apicover.jar` | The library required to run the API Coverage tool commands. | `lib/apicheck.jar` | The library required to run the API Check tool commands.
`mvn/` | Contains Apache Maven plugins.
`examples/` | Contains the files used for the Signature Test tool and API Coverage tool examples. These examples are documented in the SigTest Version 2.2 Users Guide appendix.

## Using the Signature Test Tool

The Signature Test Tool operates from the command line with the following commands.

- The `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.
- The `SignatureTest` command compares the reference API represented in the signature file to the API under test and produces a report. This is the test that becomes part of a finished test suite.
- The `SetupAndTest` command runs only in static mode, described later, to execute the `Setup` and `SignatureTest` commands in one operation.
- The `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.

[Top]

###

### Usage Examples

This section contains simple examples that show how to start the Signature Test 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 -jar sigtestdev.jar Setup -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 -jar sigtest.jar Test -static -filename result.sig -classpath` $JAVA_HOME`/jre/lib/rt.jar -package java.text`

### Operating Modes

This section describes the Signature Test tool operating modes and report messages.

[Top]

### Signature Test Compatibility Check Modes

- Binary compatibility check mode - Assures that any application runs with any compatible API without any linkage error.
- Source compatibility check mode - Verifies that any application that compiles without error with a source compatible API, also compiles without error with all other source compatible APIs.

- Mutual compatibility check mode - By checking for mutual compatibility of API member sets, the test verifies that classes and their members chosen for comparison are identical in both implementations of the API.
- Migration compatibility check mode - Verifies that any application that compiles without error with a source compatible API, also compiles without error with all other source compatible APIs.

[Top]

#### Command Run Modes

Two run modes are available during command execution, each associated with how the class descriptions are examined and retrieved, as follows:

- Reflection Mode. The default mode for the`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 Mode. Specified with the `-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 use full for testing specified classes in another runtime environment.. The `Setup and SetupAndTest` command run only in static mode.

#### Signature Test Report Messages

Report messages can be either sorted by default, or unsorted. They contain the following types of information:

- Version of both the reference API and the API under test
- Total number of errors found
- Differences such as added or missing classes, superclasses, fields, or methods
- Fully qualified name of the enclosing class related to any missing or added description
- Two errors for any modified item, one for a missing item, and another for an added item
- Description of any incompatibility in the API implementation under test

See the SigTest Version 2.2 User's Guide for hands-on procedural examples of running the tool.

## Using the API Coverage Tool

API Coverage Tool is a command-line utility that executes in a Java platform application environment. It generates static API test coverage reports in either plain text or XML format based on the following items specified by input arguments:

- The test suite being tested for its coverage, represented by a set of test class files.
- A signature file that forms a text representation of the public members of an API that must be tested by the test suite. You can use the Signature Test tool `Setup` command to create the appropriate signature file for use by the API Coverage tool. See the SigTest 2.2 User's Guide for details.
- One or more exclude lists to make the coverage calculation more accurate by excluding the elements listed in the specified exclude list files.

[Top]

##

## Known Bugs and Issues

The `SignatureTest` and `Merge` commands might incorrectly process throw lists related to generics.

[Top]

Copyright © 2008, 2010, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.The majority of the SigTest project is released under the GNU General Public License Version 2 (GPLv2)