Java Testing Patterns
As an experienced Java developer, you're probably well aware of how to use software design patterns for building better software. Now, these same lessons can be applied to software testing. With this comprehensive book, you'll discover how to use testing patterns along with design patterns in order to make the overall development process a lot more efficient and ensure that your code is easier to maintain.
Testing experts Thomas, Young, Brown, and Glover present a brief introduction to design patterns and then walk you through each of the essential types of tests that comprise a complete software test plan.
The authors then demonstrate how to use these patterns to build a real-world test suite. Each pattern contains complete Java code and detailed steps for using it to test an application. The authors also explore popular open source testing tools such as Ant and JUnit so you'll have everything you need to implement a wide range of testing solutions.
With this book, you'll quickly learn how to apply the patterns approach to software testing. The authors arm you with detailed patterns for each of the test types, including:
- Unit testing patterns
- Database testing patterns
- Integration testing patterns
- Use case testing patterns
The companion Web site contains code for Java pattern implementations as well as code for sample applications and test suites. This site also includes diagrams from the book and a bonus chapter.
Review By: Alexander A. Orsini
07/09/2010
"Java Testing Patterns" is an ideal reference for both developers and testers. In the spirit of other software books, it weaves together a multitude of patterns along with motivations, applicability, and consequences of use. It also provides implementation stubs to jump-start the testing process.
Readers will find that every chapter follows the same layout so one knows what to expect regarding the data. However, one should note that the chapters are not grouped into major categories (as are J2EE patterns). This makes it necessary to scan all of the chapters for one category.
Readers familiar with UML notation will have little trouble following the diagrams provided. Unfortunately, structural and behavioral diagrams do not appear in all sections. The chapters that include both diagrams are much easier to comprehend because the supplemental diagrams reinforce the text.
This book is directed toward coders, and is definitely something to leaf through for ideas. If you come across a project that requires testing a Java application, this book may save you considerable time and effort.
The single biggest advantage of this book is the identification and classification of the test patterns, similar to other test pattern books that help so many developers. Having something identified by name gave our team a common vocabulary for the creation of various tests. By clearly articulating the pros and cons, we were able to avoid many possible errant paths.
I have been actively supporting the application of many of the test patterns, encouraging developers and testers to informally meet every few weeks to cover one of the test patterns in the book. This is a good way to encourage people to learn and share best practices and to understand their applicability in real-world situations.
"Java Testing Patterns" is a reference book that should be on all Java developers' and testers' desks.