This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Book Reviews and the fly likes JUnit in Action by Vincent Massol, Ted Husted Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Books » Book Reviews
Bookmark "JUnit in Action by Vincent Massol, Ted Husted" Watch "JUnit in Action by Vincent Massol, Ted Husted" New topic
Author

JUnit in Action by Vincent Massol, Ted Husted

Book Review Team
Bartender

Joined: Feb 15, 2002
Posts: 933
<pre>Author/s : Vincent Massol, Ted Husted
Publisher : Manning
Category : Miscellaneous Java
Review by : Jason Menard
Rating : 9 horseshoes
</pre>
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.


More info at Amazon.com
More info at Amazon.co.uk
Book Review Team
Bartender

Joined: Feb 15, 2002
Posts: 933
<pre>
Review by : Thomas Paul
Rating : 9 horseshoes
</pre>
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.


More info at Amazon.com
More info at Amazon.co.uk
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
I see you also gave it a 9 Tom. They say that great minds think alike. Apparently so do you and I. It was certainly a good book, wasn't it?
I think Sir Ernest Friedman-Hill has also read this book. I wonder if he has anything to say about it? Although, you'd think that if he read it he would have submitted a review!
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Originally posted by Jason Menard:
I see you also gave it a 9 Tom. They say that great minds think alike. Apparently so do you and I. It was certainly a good book, wasn't it?
I have to admit that I was really tempted to give it a 10. I went back and forth a few times and even re-read a few chapters trying to decide. In the end I went on the side of not marking a book on such a limited topic as a "classic".


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Well, for a 10, it had to also have a chapter on unit testing Swing GUIs...
Seriously, a very nice book. (Didn't write a review because I was one of the proofreaders and therefore not fully objective. )


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Originally posted by Ilja Preuss:
Well, for a 10, it had to also have a chapter on unit testing Swing GUIs...

I noticed the same thing. I read this book not all that long after reading Astel's Test Driven Development: A Practical Guide, which did go pretty in depth about unit testing GUI's, so that was definitely something I noticed.
I've got three other Unit Testing / JUnit books in the queue right now (and a fourth that hasn't been published yet), so at some point I forsee me writing an article surveying them all.
And I agree with Tom, it was close to a 10.
[ December 17, 2003: Message edited by: Jason Menard ]
Rufus BugleWeed
Ranch Hand

Joined: Feb 22, 2002
Posts: 1551
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.


[ December 17, 2003: Message edited by: Rufus BugleWeed ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Jason Menard:
I've got three other Unit Testing / JUnit books in the queue right now (and a fourth that hasn't been published yet)

Do you have Rainsbergers Cookbook on the list? Looks quite promising, in my opinion.
so at some point I forsee me writing an article surveying them all.

That would be cool!
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Originally posted by Ilja Preuss:
Well, for a 10, it had to also have a chapter on unit testing Swing GUIs...
That was a consideration although not a large one. I got to thinking about the nice JUnit GUI screen and how I would use JUnit to unit test it. From the book it wasn't clear to me that it was even possible. Although I only write GUI's for my own use, I know that a lot of programmers are developing in Swing for real production applications so it would have been nice to cover that topic. Perhaps in the second edition.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Thomas Paul:
Perhaps in the second edition.

Perhaps. Afaik the english translation of Johannes Link's book has a chapter on testing Swing GUIs, which isn't available in the german original work...
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Originally posted by Ilja Preuss:
Do you have Rainsbergers Cookbook on the list? Looks quite promising, in my opinion.

I wasn't aware of that one, but I will certainly add it. Do you have any info on this one you could send me? It looks like it will be a Manning title, but it would seem to me that it might then compete with "JUnit in Action".
We're venturing into "Bunkhouse Porch" territory here, but the books I plan on including in the article at this point are "JUnit in Action", the Astels title "Test Driven Development: A Practical Guide", Kent Beck's "Test Driven Design by Example", Hunt's and Thomas' "Pragmatic Unit Testing", Link's "Unit Testing in Java", and Derek Lane's forthcoming O'Reilly title "JUnit: the Definitive Guide".
[ December 18, 2003: Message edited by: Jason Menard ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Jason Menard:
I wasn't aware of that one, but I will certainly add it. Do you have any info on this one you could send me?

You could join the yahoo group: http://groups.yahoo.com/group/junit-cookbook/
It looks like it will be a Manning title, but it would seem to me that it might then compete with "JUnit in Action".

I find it to be quite complementary. It's more like a catalog of best practices.
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Originally posted by Ilja Preuss:
Perhaps. Afaik the english translation of Johannes Link's book has a chapter on testing Swing GUIs, which isn't available in the german original work...

FYI, I just came across a pdf of this chapter which the author has made available in the "files" section of the Yahoo JUnit group.
john guthrie
Ranch Hand

Joined: Aug 05, 2002
Posts: 124
i'll add my grumble. no information about httpUnit. is httpUnit old news? is cactus the thing to use? httpUnit just seems simpler to get up and running...
 
Consider Paul's rocket mass heater.
 
subject: JUnit in Action by Vincent Massol, Ted Husted
 
Similar Threads
How to implement unit testing
"JUnit in Action" - Release Announcement - Manning
New Manning Books
Both from Manning! the difference between JUnit in Action and JUnit Recipes
JUnit Recipes: Practical Methods for Programmer Testing by J.B.Rainsberger, et al