When testing becomes a developer's habit good things tend to happen--good productivity, good code, and good job satisfaction. If you want some of that, there's no better way to start your testing habit, nor to continue feeding it, than with JUnit Recipes. In this book you will find one hundred and thirty-seven solutions to a range of problems, from simple to complex, selected for you by an experienced developer and master tester. Each recipe follows the same organization giving you the problem and its background before discussing your options in solving it.
JUnit – the unit testing framework for Java – is simple to use, but some code can be tricky to test. When you're facing such code you will be glad to have this book. It is a how-to reference full of practical advice on all issues of testing, from how to name your test case classes to how to test complicated J2EE applications. Its valuable advice includes side matters that can have a big payoff, like how to organize your test data or how to manage expensive test resources.
What's Inside:
- Getting started with JUnit
- Recipes for: servlets JSPs EJBs Database code much more - Difficult-to-test designs, and how to fix them
- How testing saves time
- Choose a JUnit extension: HTMLUnit XMLUnit ServletUnit EasyMock and more!
Customer Reviews
Average Rating:
Rating: - Straightforward informative, all stuff, no stuffing
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- but don't know much more. It gets straight to the point and pretty quickly takes you from the no-nothing state to being able to using JUnit. At least, it did that in my case.
In a nutshell, this book will get you testing fast so you can move on and think about other, more interesting things.
Read More
Rating: - More than just recipes
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!
Rating: - The Best Programming Book I know
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 general, not just for Java or JUnit testing. It stresses the importance of unit testing, programming to interfaces instead of implementations and just simple common sense. The author is clearly passionate about his field and extremely experiences. The combination of enthusiasm and experience comes through on every page.
Rating: - Excellent coverage of advanced unit testing
Rainsberger does a very good job of detailing the techniques to unit test difficult code; including xml, ejb, servlets, jsps etc.
Rating: - Put this next to Knuth and The Gang of Four on your bookshelf
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 ... Read More