• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:

JUnit in Action by Vincent Massol, Ted Husted

 
Bartender
Posts: 962
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<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
Posts: 962
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<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
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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".
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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. )
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ]
 
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic