There is something ironic about a book on testing that is as riddled with errors as this one. Proofreading cannot be automated, but here it seems to have been pretty much skipped entirely.
Having inherited a Java application that, while working quite well, is hard to maintain and extend because of its ad-hoc structure, I was looking for a quick-start guide to the more Java-specific techniques I need, to complement Robert Martin's Working Effectively with Legacy Code
. There is some potentially useful material in "Java Testing Patterns" but it is presented in a way that makes it hard work to dig it out.
I have the impression that the authors have rather hurriedly put together a first draft, keen to latch onto the "Design Patterns" bandwagon, and not taken the time to review and refactor their work before publication. Material is shoehorned into the "Name, Intent..." format favoured by the Gang of Four, even when it does not make a natural fit, and even they admit in one case that their "Use Case Testing Pattern" is "less of a traditional design pattern and more of an implementation strategy or template." Use case testing is certainly a topic of interest, but it could be presented much better in a different format. The Gang of Four book
is hard to read because the material is complex, but it is well written and rewards study. This book covers much more basic material, but is hard to read because it is poorly constructed.
As for the actual errors, I gave up listing them. Most are distracting rather than seriously misleading, as in the frequent use of "it's" as a possessive pronoun, the reference on page 3 to "Allen [sic] Turing" and his famous and much misunderstood Halting Theorem, and the testSetDateOfBirth() method that actually sets a dog's eye colour.
The appendices provide a brief overview of relevant tools such as JUnit, but not in a form that adds much value to a simple listing of available methods. The appendix on UML describes, understandably, only a subset of the available syntax, but it is a pity this doesn't coincide with the subset used in the rest of the book. And as for UML, I am no expert, but is ImplementingClass1Test really "composed" of instances of ImplementingClass1 as illustrated in figure 12.1?
A second or third draft might have been worth the price, but the authors seem to have passed up on the opportunity.