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.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your email address or mobile phone number.

JUnit Recipes: Practical Methods for Programmer Testing

4.6 out of 5 stars 23 customer reviews
ISBN-13: 978-1932394238
ISBN-10: 1932394230
Why is ISBN important?
ISBN
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Have one to sell? Sell on Amazon
Buy used On clicking this link, a new layer will be open
$10.99 On clicking this link, a new layer will be open
Buy new On clicking this link, a new layer will be open
$37.02 On clicking this link, a new layer will be open
More Buying Choices
17 New from $11.50 37 Used from $0.13
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

$37.02 FREE Shipping. Only 5 left in stock (more on the way). Ships from and sold by Amazon.com. Gift-wrap available.
click to open popover

Frequently Bought Together

  • JUnit Recipes: Practical Methods for Programmer Testing
  • +
  • Practical Unit Testing with JUnit and Mockito
  • +
  • Clean Code: A Handbook of Agile Software Craftsmanship
Total price: $101.74
Buy the selected items together

Editorial Reviews

Review

"Very comprehensive...Highly Recommended." -- C Vu, Journal of ACCU

About the Author

Rainsberger is a deeloper and consultant who has been a leader in JUnit community since 2001.


Stirling has worked as a technical support and QA engineer for JRun since Allaire acquired the JRun product.
NO_CONTENT_IN_FEATURE


Product Details

  • Paperback: 721 pages
  • Publisher: Manning Publications (July 15, 2004)
  • Language: English
  • ISBN-10: 1932394230
  • ISBN-13: 978-1932394238
  • Product Dimensions: 7.4 x 1.7 x 9.2 inches
  • Shipping Weight: 2.5 pounds (View shipping rates and policies)
  • Average Customer Review: 4.6 out of 5 stars  See all reviews (23 customer reviews)
  • Amazon Best Sellers Rank: #1,116,942 in Books (See Top 100 in Books)

Customer Reviews

Top Customer Reviews

By Michael Cohn on August 6, 2004
Format: 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.
Comment 26 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: 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.
Comment 17 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
This review also appears on StickyMinds at [...]

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 ›
Comment 14 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
This is a good book. It was very important when it came out. It is dated however and we need a new book on the subject since JUnit is up to version 4.6 as of this writing. Following examples from this book from the start you would want JUnit 3.8 to avoid the confusion. Then you would have to learn the differences between 3.8 and 4.6 which are substantial. Where have all the programmers gone? Books use to be up to date, now we are stuck with many 5 year old books with reviews from 2004. This does not keep programmers informed and secure in their jobs. Time for a new updated edition on this one to make it truly useful.
6 Comments 27 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
Sometimes the tiniest things are the most useful. Nails, screws, paperclips and post-its are all small, simple objects that are used a thousand different ways. So it is with JUnit -- a small and really very simple testing tool that can find its way into every corner of your Java development.

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.
Comment 15 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Recent Customer Reviews

Set up an Amazon Giveaway

JUnit Recipes: Practical Methods for Programmer Testing
Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
This item: JUnit Recipes: Practical Methods for Programmer Testing