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
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 chapters will get you acquainted with JUnit, such as setting it up, and with some simple, basic tests to get you started. The rest of the book contains the most valuable and useful information that you can apply to your projects. They describe the more complex situations/environments (J2EE application server, standalone, etc.) that you encounter everyday and how to write tests for each situation. It is these chapters that will have you coming back for more, when you're stumped on how to write a JUnit test for your specific problem. Junit Recipes also gives you tips on organizing your tests, testing legacy code, and much more. Each recipe is written in a similar format, describing the problem, background, and finally, the recipe itself, making this book easy to read. This book definitely belongs on your desk at work (or your bookshelf at home) -- it comes in handy when you are having trouble coming up with tests for difficult situations. I highly recommend it if you would like to learn how to write better tests and learn how to test code in complex environments.
Tasty recipes for success
Published by Thriftbooks.com User , 21 years ago
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.
Excellent 'howto' book
Published by Thriftbooks.com User , 21 years ago
Manning is one of my favorite technical book publishers, and this book is another reason why. 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).
Wow!
Published by Thriftbooks.com User , 21 years ago
"JUnit Recipes" is a very thorough and comprehensive encyclopedia of excellent advice and examples on almost every coding situation I've ever wanted to test with JUnit. J. B. Rainsberger has compiled a 700 page collection of scores of excellent recipes written in pattern-like fashion, clearly laying out testing problems in wont of solutions and the practical recipes for solving the problems, including annotated code examples, step-by-step instructions, and plenty of quality explanations. "JUnit Recipes" is destined to be a classic, and has earned a most prominent place on my bookshelf, as I'm certain I'll be referencing it frequently for new and better ideas on formulating JUnit tests. What's that? You'd like to borrow my copy of "JUnit Recipes?" No, get your own.
A wonderful compendium of JUnit tips and tricks
Published by Thriftbooks.com User , 21 years ago
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.
ThriftBooks sells millions of used books at the lowest
everyday prices. We personally assess every book's quality and offer rare, out-of-print treasures. We
deliver the joy of reading in recyclable packaging with free standard shipping on US orders over $15.
ThriftBooks.com. Read more. Spend less.