JUnit is the most popular open source unit testing framework for Java based projects. Its popularity can be judged from the fact that Eclipse IDE provides out of the box support for JUnit. There is nothing like automating your unit testing by writing JUnit tests or using JUnit for Test Driven Development (TDD). Other popular libraries like ANT also come with support for running JUnit based unit tests from project build file.

junit

Add timeout to Junit test cases
Tutorial on setting timeout for each test case and all test cases using Junit annotations and ANT task. All test cases should get fair time for execution.

JUnit Assert Statement Example
JUnit based test cases can pass or fail in an application based on assert statements. There are many assert statements offered by JUnit as explained here.

Organize Junit Test cases using categories
One of the new feature of JUnit is to allow categorize the unit test cases. This helps when executing a bunch of selected test cases together as per need.

Creating Test Suite with Junit
Tutorial on how to create a test suite which includes unit tests from multiple classes. Sample code and execution of test suite using Eclipse IDE.

JUnit Test case lifecycle
A diagram showing the life cycle of unit test written using JUnit. Various life cycle methods being invoked during JUnit test case execution.

Add JUnit support in Eclipse project
How to configure JUnit jar file in Eclipse so that you can write unit test cases for your application along with the application code.

Best JUnit books
Take your unit testing to new heights by following advise given in these JUnit books.