24 of 24 people found the following review helpful:
5.0 out of 5 stars
A wonderful compendium of JUnit tips and tricks, August 6, 2004
This review is from: JUnit Recipes: Practical Methods for Programmer Testing (Paperback)
J. B. Rainsberger's JUnit Recipes is a wonderful compendium of tips and tricks that can quickly take anyone from novice to expert at JUnit. The organization of the book should make it appealing to unit-testing programmers of all levels. Early chapters are highly introductory, covering the installation and first uses of JUnit. Later chapters cover testing of JDBC, Enterprise Java Beans, XML, and more.
JUnit Recipes includes the best discussions I've read on how to test database applications and on the complicated art of managing test data. This is probably not a book you will read every chapter of. In my programming, for example, I don't use EJB so I only skimmed that chapter. But at over 700 pages is much more of an encyclopedia of wonderful testing techniques than a book that is meant to be read cover to cover. As its title implies, JUnit Recipes is a cookbook of ideas that will allow you to serve up better, and better-tested, applications.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
16 of 16 people found the following review helpful:
4.0 out of 5 stars
Put this next to Knuth and The Gang of Four on your bookshelf, December 30, 2005
This review is from: JUnit Recipes: Practical Methods for Programmer Testing (Paperback)
This isn't necessarily the best introduction for absolute beginners (I would recommend /Pragmatic Unit Testing/ for that), but it is required reading for server-side Java, as most other reviewers have pointed out. But it's more than that--it's one of those rare computer books that transcends its subject matter. Why? Because it can make you a better programmer. While some of the credit can rightly be given to unit testing and Test-Driven Development in general, Rainsberger's book makes you /see/ better ways to write and refactor your code. The breadth and depth of examples is astonishing--he convincingly shatters "but it's too hard to test that" arguments with well-researched, non-trivial examples. In fact, I'd say that this is almost a better J2EE tutorial than most books about J2EE proper.
I'm withholding a star for one reason: the book doesn't cover GUI testing tools like Jemmy, JFCUnit, or Abbot/Costello. These JUnit extensions are ripe for a book with this depth; it's just too bad that this couldn't be that book. Other than that, I find that I turn to Rainsberger's book far more often than any other testing book or online reference.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
14 of 14 people found the following review helpful:
4.0 out of 5 stars
Required reading for using Java+J2EE+JUnit in the real world, November 18, 2005
This review is from: JUnit Recipes: Practical Methods for Programmer Testing (Paperback)
This review also appears on StickyMinds at http://www.stickyminds.com/s.asp?F=S767_BOOK_4
JUnit Recipes is a comprehensive tome of practical methods and techniques for the opensource JUnit tool to develop automated unit-tests for Java/J2EE applications. The book is split into four parts: Building Blocks, Testing J2EE, Additional JUnit Techniques, and Appendices. The Building Blocks cover the basics of using JUnit to create basic tests, organize and manage test suites and test data, running JUnit tests and reporting the results. It even includes a section on troubleshooting. Testing J2EE covers XML, JDBC, EJB, web components (including JSPs), and J2EE applications. Additional techniques include testing some well known design patterns, using JUnit add-ons and JUnit libraries (like GSBase). The Appendices include complete solutions (including code of course), some short and sweet essays on testing, and a modest recommended reading list.
The organization of the book flows very logically and the writing style is very clear and easy to follow. Along the way many insights into important design principles and testing techniques are revealed: the reader will learn about the "Hollywood principle", the Open-Closed principle, design patterns, POJOs, Mock Objects, Private and Parameterized Test-Cases, Abstract Test-Cases, Self-Shunts, and Spys. The book's coverage is very comprehensive and touches on many other popular Java/Enterprise projects and frameworks such as Struts, JBOSS, Prevayler, XDoclet, Tomcat, XPath, XMLUnit, HTTPUnit, Ant, Jakarta, and others.
Even though JUnit is often associated with "Agile" development and much of the wisdom apparent in the book applies to agile Java development, the book is useful to any Java developer on any Java project (agile or otherwise). The book also goes into considerable detail, with working code examples, to spell out exactly how to perform and apply the techniques it describes.
The book's primary audience is Java developers. Java Tester's will still find some good nuggets of information but it's quite clear that Java programmers and developers are the target audience. This isn't some high-level theoretical book mostly of concepts and ideas. This is an imminently pragmatic guide that not only conveys a great deal of highly practical wisdom but also clearly and comprehensively walks you through the explanations and the code to accomplish and apply the techniques it describes. The book is also not a "How To" for coming up-to-speed on setting up and running JUnit.
Another book from the same publisher, "JUnit in Action" is a great overview on learning more about the basics of running and using JUnit and on using JUnit to tackle a number of basic challenges with unit-testing Java and J2EE code. JUnit Recipes has some overlapping material but pretty much "picks up" where "JUnit in Action" leaves off, and JUnit Recipes goes into much more breadth and depth of coverage of JUnit methods, practices and techniques and use with other Java projects and frameworks.
I would say JUnit Recipes should probably be required reading for anyone attempting to use Java, J2EE and JUnit in the real-world.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No