aspose file tools*
The moose likes Testing and the fly likes JUnit in Action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "JUnit in Action" Watch "JUnit in Action" New topic
Author

JUnit in Action

Rafal Groszewski
Greenhorn

Joined: Sep 24, 2003
Posts: 1
I have read the "JUnit in Action" month ago.
Could you give me some reasons why I should read
yet another JUnit book :-)?
What topics I will find which have been not covered
by "JUnit in Action"?
Best regards,
Rafal
Prag Dave
author
Greenhorn

Joined: Feb 17, 2004
Posts: 24
If you're happy and effective, testing all the stuff that you should test, then that's great, and I wouldn't try to ram another book onto your bookshelf. You might want to look through the table of contents, though, as we have a lot of stuff on the design side as well as the mechanics of testing.
Click here for the PDF contents

Cheers

Dave
Rick Portugal
Ranch Hand

Joined: Dec 17, 2002
Posts: 243
This is the correct link. (You had "http://" repeated twice).


IBM 286, SCJP, SCWCD, EIEIO
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
As someone who has read just about every Java related unit testing book out there, including Pragmatic Unit Testing and JUnit in Action, let me just say that there is no one perfect book. However, if a novice unit tester were to ask me what one single book they should pick up to get the ball rolling, I would suggest the Pragmatic title. That being said, I would push them really hard to pick up JUnit in Action in addition to Pragmatic Unit Testing.
The Pragmatic book really focuses on teaching the reader which tests need to be written, whereas JUnit in Action focuses on how to write unit tests for J2EE components. There is quite a difference in the two approaches. If you want to learn how to unit test your Servlet, pick up JUnit in Action. If you want to learn how to discover which unit tests need to be written in your application in the first place in order to ensure you are adequately testing your class, then reach for Pragmatic Unit Testing.
There are several good books on the subject out there that are definitely worth a look, including Link's Unit Testing in Java: How Tests Drive the Code and Astel's test-driven development: A Practical Guide, but my particular favorites are Pragmatic Unit Testing and JUnit in Action, which I feel compliment each other nicely.
[ February 17, 2004: Message edited by: Jason Menard ]
Faisal Khan
Ranch Hand

Joined: Jun 29, 2003
Posts: 285
Jason,
Thanks for that excellent descriptive analysis on your take on the JUnit in Action and Pragmatic Unit Testing.
I personally started with JUnit in Action book and still find asking myself, which test do I need, so its good to know that the Pragmatic book covers this issue.
FK


The secret to creativity is knowing how to hide your sources.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30764
    
156

Junit in action covers a lot of different technologies. It looks like the Pragmatic book covers best practices type things within junit.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Jason Menard:
The Pragmatic book really focuses on teaching the reader which tests need to be written, whereas JUnit in Action focuses on how to write unit tests for J2EE components. There is quite a difference in the two approaches. If you want to learn how to unit test your Servlet, pick up JUnit in Action. If you want to learn how to discover which unit tests need to be written in your application in the first place in order to ensure you are adequately testing your class, then reach for Pragmatic Unit Testing.

Hi Jason Menard,
How would u compare the bool that u have reviewed in this thread. with the "Andy & Dave"'s book? Which one will u hand to a newbie in Unit testing?
I do have experience in Unit Testing with JUnit using JBuilder... I just know how to get things done by clicking these and those buttons..... But I do not know in details of JUnit... Could u please suggest something, Mr.Jason? Thanks a lot...


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Unit Testing in Java falls somewhere between the two previously mentioned books, but is more similar to JUnit in Action I guess. As I said previously, I don't think any single book has all the answers, and they are all worth reading.
Now if you had a stack of four of the main unit testing and TDD titles, this is the order in which I might suggest they be read
1. "Pragmatic Unit Testing in Java with JUnit"; Hunt and Thomas - this is where it all begins.
2. "test-driven development: A Practical Guide"; Astels - a good introduction to test-driven development. Good coverage of mock objects. Beck also has a TDD book out, but it isn't required reading imho. If you absolutely want to read Beck's Test-Driven Development by Example, I would read it before the Astels title.
3. "Unit Testing in Java: How Tests Drive the Code"; Link - A little "deeper" in some areas than the other books. Covers both general practices and some component specific stuff, but I feel that most of this book's value lies in the general practices area.
4. "JUnit in Action"; Massol - Best coverage of unit testing J2EE components.
The order I gave above isn't saying that one book is "better" than another, or that the Astels book is "better" than the Link book for example. Merely that is just a logical reading order given those titles. If you go back and read my reviews for each of those books listed above, you will see that I gave them ratings of 10, 7, 8, and 9 respectively. There will be a forthcoming review for Beck's book as well, maybe later this week.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Mr.Jason Menard,
Thank you very much for your description on all of the books about Unit Testing... I am looking forward to read your review on the Beck's book as well...
I do hope that others might find your post really valuable in deciding which book they should approach for studying about the unit testing...
Thanks again, Mr.Jason....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JUnit in Action