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
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
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 ]
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.
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...
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
Joined: Jun 08, 2002
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....