JUnit in action, Vincent Massol with Ted Husted


|*Title*: |JUnit in action|
|*Authors*: |Vincent Massol, Ted Husted|
|*Published by*: |Manning Publications Co.|

h3. Abstract

Although the emphasis in _JUnit in action_ is on unit testing (of course!), it offers more. It details the JUnit test framework, while at the same time putting unit testing in a broader context (unit -> integration -> functional -> acceptance testing).

h3. Summary

After a (detailed) introduction of the basics of the JUnit framework (chapters 1..3), the author distinguishes between different software tests in chapter 4 and after looking more closely at integrating JUnit tests with Ant, Eclipse and Maven, he continues with testing strategies in general in chapter 5.

The second part of the book (chapters 6..8) discuss testing strategies, such as stubs, mock objects and in-container testing with Cactus.

Part III applies all these testing strategies on different small applications/projects. This encompasses various techniques/frameworks, such as servlets, JSPs, (custom) taglibs, DB apps and EJBs.

h3. Personal opinion

The book discusses every aspect of unit testing. Consequently, the book is excellent as a reference on how to design/implement unit tests in various frameworks. The sample code can easily be downloaded and incorporated in de Eclipse IDE. However, I sometimes got the feeling that some of these examples are too much dependent on external libraries and hence require quite some additional bandwidth (-: Apart from Part I, which does an excellent job as a JUnit tutorial, the other chapters involve quite some prerequisite knowledge and are in my opinion more meant for diagonal reading: you would only read (some of) these chapters if you are working on a project that involves the issues of those particular chapters.


  1. Java Donkey May 15, 2007
  2. Jasper January 12, 2006
  3. united states January 10, 2006