Index of /~cappello/50-2007-Winter/projects/cappello/testlib/junit4.1

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[TXT]cpl-v10.html 2006-05-02 21:54 15K 
[DIR]doc/ 2007-01-30 18:23 -  
[DIR]javadoc/ 2006-05-02 21:54 -  
[   ]junit-4.1-src.jar 2006-05-02 21:54 74K 
[   ]junit-4.1.jar 2006-05-02 21:54 110K 
[DIR]junit/ 2007-01-30 18:23 -  
[DIR]org/ 2007-01-30 18:23 -  

JUnit 4.1

JUnit 4.1


Brought to you by Kent Beck, Erich Gamma, and David Saff.
FAQ edited by Mike Clark. Web mastering by Erik Meade.
(see also JUnit.org)

27 April 2006

JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.

Summary of Changes with version 4.1

Summary of Changes with version 4.0

The architecture of JUnit 4.0 is a substantial departure from that of earlier releases. Instead of tagging test classes by subclassing junit.framework.TestCase and tagging test methods by starting their name with "test", you now tag test methods with the @Test annotation.

Contents of the Release

README.html  this file
junit-4.1.jar a jar file with the JUnit framework
junit-4.1-src.jar a jar file with the source code of the JUnit framework
org/junit the source code of the basic JUnit annotations and classes
    samples sample test cases
    tests test cases for JUnit itself
javadoc javadoc generated documentation
doc documentation and articles

Installation

Below are the installation steps for installing JUnit:
  1. unzip the junit4.1.zip file
  2. add junit-4.1.jar to the CLASSPATH. For example: set classpath=%classpath%;INSTALL_DIR\junit-4.1.jar;INSTALL_DIR
  3. test the installation by running java org.junit.runner.JUnitCore org.junit.tests.AllTests.

  4. Notice: that the tests are not contained in the junit-4.1.jar but in the installation directory directly. Therefore make sure that the installation directory is on the class path
Important: don't install junit-4.1.jar into the extension directory of your JDK installation. If you do so the test class on the files system will not be found.

Getting Started

To get started with unit testing and JUnit read the article: JUnit Cookbook.
This article describes basic test writing using JUnit 4.

You find additional samples in the org.junit.samples package:

Documentation

JUnit Cookbook
    A cookbook for implementing tests with JUnit.
Javadoc
    API documentation generated with javadoc.
Frequently asked questions
    Some frequently asked questions about using JUnit.
License
    The terms of the common public license used for JUnit.
The following documents still describe JUnit 3.8.

Test Infected - Programmers Love Writing Tests
    An article demonstrating the development process with JUnit.
JUnit - A cooks tour

Known Defects


SourceForge Logo