JUnit 3.2



01/25/2000 Kent Beck and Erich Gamma

JUnit is a simple framework to write repeatable tests. JUnit can be used with JDK 1.1.* and JDK 1.2.*.

Summary of Changes between 3.1 and 3.2

Summary of Changes between 2.1 and 3.1

JUnit Framework

TestRunner

Documentation

Release


Summary of changes between 1.0 and 2.1

Contents of the Release

README.html  this file
junit.jar a jar file with the JUnit framework and  tools 
src.zip a zip file with the source code of the junit framework
junit the source code of the JUnit samples
    samples sample test cases
    tests test cases for JUnit itself
javadoc javadoc generated documentation
doc documentation and articles
vaj Files for using JUnit with VisualAge for Java

Installation

Below are the installation steps for installing JUnit:
  1. unzip the junit.zip file
  2. add junit.jar to the CLASSPATH. For example: set classpath=%classpath%;INSTALL_DIR\junit3\junit.jar
  3. test the installation by using either the batch or the graphical TestRunner tool to run the tests that come with this release. All the tests should pass OK.
Refer to Installing JUnit in VisualAge for Java for VisualAge for notes about installing JUnit in VisualAge for Java.

Getting Started

To get started with unit testing and JUnit read the Java Report article: Test Infected - Programmers Love Writing Tests.
This article demonstrates the development process with JUnit in the context of multiple currency arithmetic. The corresponding source code is in junit\samples\money.

You find additional samples in the junit.samples package:

Which TestRunner to use?

JUnit comes with different TestRunners:

Documentation

JUnit Cookbook
    A cookbook for implementing tests with JUnit.
Test Infected - Programmers Love Writing Tests
    An article demonstrating the development process with JUnit.
JUnit - A cooks tour
Javadoc
    API documentation generated with javadoc.
Using JUnit with VisualAge for Java
    Hints about how to use JUnit in the VisualAge for Java environment.
Frequently asked questions
    Some frequently asked questions about using JUnit.

Extending JUnit

Examples of possible JUnit extensions can be found in the junit.extensions package: