Two Laptop Bag
The moose likes Testing and the fly likes JUnit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "JUnit" Watch "JUnit" New topic


Surya Kumar
Ranch Hand

Joined: Aug 21, 2004
Posts: 52
I am new to testing using JUnit. I have the following questions:
a] Which is the right book that covers the whole of JUnit testing that includes J2EE?
b] Where can i find the necessary resources in the net?


Regards<br />Prem<br />SCJP, SCJD, SCWCD, SCBCD, SCEA, SCJDWS
Jason Menard

Joined: Nov 09, 2000
Posts: 6450
I don't think there is one single book that is best. I recommend at least two books: Pragmatic Unit Testing, and JUnit Recipes. There are other books on the subject worth reading including Junit In Action, and Unit Testing in Java to name but a couple, but I consider Pragmatic Unit Testing to be a must read for the essentials, and JUnit Recipes to be the single best book covering J2EE.
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
What Jason said!

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Surya Kumar
Ranch Hand

Joined: Aug 21, 2004
Posts: 52
I got 'JUnit in Action', bcos its seems up to the point. What do you think it lacks comparing to te JUnit Recipes?
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32614

JUnit Recipes has more patterns/techniques and common issues than JUnit in Action. I found both to be valuable reads though. JUnit Recipes also covers more topics, such as XML testing. You can see the JUnit Recipes table of contents to compare it to the book you have.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
And just for completeness, "Unit Testing in Java" discusses some topics that the other two are missing, such as testing Swing GUIs and concurrent code.

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
I agree. Here's the link:
subject: JUnit
It's not a secret anymore!