JUnit 4.x Howto

$Revision: 2422 $

This document may be freely served, duplicated, or distributed, as long as the contents are not modified. Usage of described software is covered by the licenses of the individual products.

Sponsored by

Table of Contents

Preface
Available formats for this document
License
Purpose
Coverage
Support
1. Introduction
What is JUnit
Obtaining and Installing JUnit
Test Coverage -- quantity of test cases
2. Test Expressions
3. Class org.junit.Assert
4. Test Methods
Handling Throwables in your Test Methods
JUnit Failures vs. Errors
5. Test Classes and the JUnit Test Execution Environment
6. Specifying which Tests to Execute
7. Using Test Runners
8. Using JUnit with Ant
9. Using JUnit with IDEs

List of Tables

1. Available formats of this document

List of Examples

4.1. Implementation of a JUnit Test Method
4.2. Generically treating generated Exceptions as test Failures
5.1. Example JUnit test class
7.1. Executing tests from the command line
8.1. Ant build file snippet

$Revision: 2422 $