Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your email address or mobile phone number.
JUnit Recipes: Practical Methods for Programmer Testing
Use the Amazon App to scan ISBNs and compare prices.
Frequently Bought Together
Customers Who Bought This Item Also Bought
More About the Author
Top Customer Reviews
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.
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.
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, [...] 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).Read more ›
Rainsberger's book is a compendium of those thousand ways that JUnit can be used (well, OK, more like 130 ways). Each recipe starts with a solid motivation and includes a worthwhile discussion afterwards. You quickly realize that the author is sharing hard-won experience with you on every page. There are sections on testing standalone code of every description, as well as detailed sections on testing servlets, EJBs, and other less tractable components.
I've been using JUnit for years, but I picked up quite a few useful tips from this enjoyable book. Highly recommended.
Most Recent Customer Reviews
This is a good book for both beginners and professionals. The recipes give detailed answers in a "how to do" format.Published on March 21, 2010 by Raghavendra Joshi
This is the JUnit book for you if you're looking into JUnit and basically get the idea - there's frameworks out there which will run tests that you write and JUnit is one of them-... Read morePublished on November 13, 2008 by mathboy
This is a readable, practical, and deep book. It's one of those books which teaches or refreshes Java and OO theory and practice as you read. I am also reading it for pleasure!Published on October 9, 2007 by Malcolm Gorman
This is a great book. It is directed at users of JUnit, the Java unit testing framework. But in my mind the book gives sound advice for solving your programming problems in... Read morePublished on March 8, 2007 by catawampus
Rainsberger does a very good job of detailing the techniques to unit test difficult code; including xml, ejb, servlets, jsps etc.Published on January 18, 2006 by Barry
After you've mastered the basics of JUnit, this book is the book to get.
However, even if you're new to JUnit, this is still an excellent book to get, as the first few... Read more
This thick volume (700 pages including good references and reading list) is aimed at three groups: Java developers in general, JUnit users, and lastly software testers. Read morePublished on February 28, 2005 by Mr P R Morgan
A JUnit monster book! Detail after detail after detail... Such a amazing thing to see some many tips bounded together. Read morePublished on February 24, 2005 by mingdong he
What can I say? JUnit Recipes is a great book among great books on the subject of Test-driven Development. J.B. Read morePublished on February 21, 2005 by Carlos Valcarcel