- 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: 23 customer reviews
Amazon Best Sellers Rank:
#1,567,147 in Books (See Top 100 in Books)
- #588 in Books > Computers & Technology > Programming > Software Design, Testing & Engineering > Testing
- #1503 in Books > Computers & Technology > Programming > Languages & Tools > Java
- #1690 in Books > Computers & Technology > Programming > Software Design, Testing & Engineering > Object-Oriented Design
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 mobile phone number.
JUnit Recipes: Practical Methods for Programmer Testing
Use the Amazon App to scan ISBNs and compare prices.
Fulfillment by Amazon (FBA) is a service we offer sellers that lets them store their products in Amazon's fulfillment centers, and we directly pack, ship, and provide customer service for these products. Something we hope you'll especially enjoy: FBA items qualify for FREE Shipping and Amazon Prime.
If you're a seller, Fulfillment by Amazon can help you increase your sales. We invite you to learn more about Fulfillment by Amazon .
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Frequently bought together
Customers who viewed this item also viewed
"Very comprehensive...Highly Recommended." -- C Vu, Journal of ACCU
About the Author
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
JUnit Recipes is a front-to-back roadmap of JUnit use. It is clearly written and it contains a wealth of information. This past week, I was creating an extension for FIT which runs JUnit tests, and I kept pulling J.B.'s book off my shelf. Finally, I stopped putting it back and left it on my desk. I think that was the right move because nearly every time I picked it up, I dog-eared another two pages.
J.B.'s advice is very good. It goes far beyond the mechanics of JUnit and its extensions. It extends to very direct concrete advice about testing. I recommend that everyone who uses JUnit get a copy. If you are like 90% of the JUnit users out there, you use JUnit but you aren't really using JUnit; not in the way that you will after reading this.
Everyone knows about JUnit by now, or at least knows they should be using it. But once you start using it, you are faced with a lot of 'best practice'-type questions... Should my unit tests be in the same package as the code it is testing? Should I keep the test code in the distributed jar file? How do I test for 'coverage' of my code? How do I test conplex things (like EJBS) that need infrastructure (like a container) in order to run? What common tests should I perform to guarantee well-behaced classes?
This book feels like it was written by someone who has had experience not only making these decisions and discovering how to do things, but also has experience communicating these decisions to others.
If you use JUnit, this book is for you. Undoubtedly you have either learned or have yet to learn the stuff in this book. If you have already learned it, there is surely some 'supplimental' material here for you... If you need to learn it, this book is a lot easier and cheaper than your own trial and error. (Even if you use any other xUnit frameworks, this book may have material of interest to you).
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). 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.
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.
Most recent customer reviews
However, even if you're new to JUnit, this is still an excellent book to get, as the first few...Read more