java hosting


Title
Author
Publisher
ISBN
Reviewed by
Review text
Category

Your search returned 1 matching documents




JUnit in Action
by Vincent Massol, Ted Husted, Petar Tahchiev, Felipe Leme, Vincent Massol, and Gary Gregory


Manning Publications
1 edition
October 2003
384 pages

Reviewed by Thomas Paul, December 2003
  (9 of 10)


I think we can all agree that unit testing is a good thing that can be painful to implement. The main problem with unit testing is building tests that are easy to run and maintain. That is where JUnit enters the picture. JUnit simplifies the task of creating unit tests and this book simplifies the task of understanding and using JUnit.

The book starts with the basics of using JUnit but then moves on to explaining the intricacies of JUnit. UML diagrams clearly show the flow of control within JUnit and your unit tests. The author gives a good description of how to integrate JUnit with Ant, Maven, and Eclipse. The book also shows how to do unit testing of Servlets and JSPs which can be much more complex to test. The author demonstrates both the use of Cactus as well as the use of mock objects for J2EE testing. In fact, the best part of the book is that the author helps you determine how to decide what type of testing strategy is right for your application.

I thoroughly enjoyed this book and found the author's comments clear and insightful. The author supplies plenty of code samples with explanations of not just how but why we do our testing a certain way. The author's own experience is passed on to us with his "best practices". Anyone who is writing Java code should read and understand this book. The quality of the code you produce will vastly improve.

Discuss book in the Saloon More info at Amazon.com



Manning Publications
1 edition
October 2003
384 pages

Reviewed by Jason Menard, November 2003
  (9 of 10)


If you've ventured into a bookstore lately, you may have noticed that the number of titles available on agile methodologies is multiplying more rapidly than the populations of some third-world countries. Leafing through any one of these titles while sipping an espresso in the bookstore's coffee bar, you'll quickly figure out that repeatable, automated unit tests are a good thing, and that JUnit is the unit testing framework most often used for Java unit testing. A couple of mochachino grande's later, and you've read enough to convince you that your continued survival rests on writing these automated unit tests. Unfortunately, and before your caffeine buzz even wears off, you're struck with the realization that while you're motivated and ready to go, you're just not sure exactly how to go about writing tests for many of your J2EE components.

"JUnit in Action" picks up where these other texts leave off. This is not a book on test-driven development, and it's not a book trying desperately to convince you of the value of tests. The book's goal is to demonstrate exactly how to write comprehensive unit tests for the various components of your J2EE applications. Writing tests for servlets, filters, JSPs, taglibs, database components, and EJBs are all covered in detail, as are testing strategies using mock objects and Cactus. Not only are you shown how to write the tests, but also how to write testable code. Along the way, the author points out useful best practices and how to use design patterns to improve your tests and the code you are testing. Code examples are thoroughly documented throughout the text in order to illustrate the techniques being discussed.

"JUnit in Action" is the definitive how-to manual for unit testing J2EE components. Pick up one of the other books if you're looking for something more motivational, but when you're ready to sit down and bang out some code, you'll want this book at your side.

Discuss book in the Saloon More info at Amazon.com



Manning Publications
second edition
July 2010
504 pages

Reviewed by Jeanne Boyarsky, September 2010
  (7 of 10)


I truly enjoyed reading the first edition of "JUnit in Action" and was somewhat disappointed by the second edition. It wasn't even that the second edition was bad. It's that my expectations were too high from the first edition.

I think there were too many authors on the book. The different styles were apparent which is awkward in a book. The cover says the book covers JUnit 4.8 while the contents of the book are JUnit 4.6. (This one is probably marketing's fault, but it stands out extra on a book about quality.)

I also think the scope of the book was too large. Many things are covered, but not enough things are covered well. I expect a book titled "JUnit in Action" to cover the core of JUnit well. While most things were mentioned, there were only 3 pages on Hamcrest matchers. I felt other core concepts were breezed through and not enough space was spent on the fundamentals. The first edition had more pages on core JUnit and there was less to cover then!

I was also surprised not to see Mockito mentioned in the mock testing section or Emma in the coverage section. Not featured, mind you. Just mentioned. And finally, I found one factual error that I consider significant because it is a fallacy. I posted it in the Manning forum 8/3 and haven't received a reply. Nor have many people who posted since May or beyond. Why is there a forum if nobody reads it?

Many things were done well - examples, best practices, available tools. I just had the bar so high from the previous edition that I was let down.

If you already own the first edition or are familiar with what is out there, you don't need this book. If you've never done anything in JUnit, it is still useful. Just remember that the order unit tests are run is not guaranteed!


Disclosure: I received a copy of this book from the publisher in exchange for writing this review on behalf of JavaRanch.

Discuss book in the Saloon More info at Amazon.com

 
The Bunkhouse administrator is Ankit Garg.