This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Testing and the fly likes JUnit Testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "JUnit Testing" Watch "JUnit Testing" New topic

JUnit Testing

anuj thite
Ranch Hand

Joined: Apr 14, 2009
Posts: 49
Hello all ranch members,

i have a question about JUnit please guide me in this.

one of my friend told me to study JUnit for unit testing purpose.

Currently i have no job, no certification.

Can you please explain what is the diffrerence between manual testing which is done by software tester & unit testing.

i am rating myself in core java as between beginner & intermediate.

i have a basic knowledge of Servlets & Jsp.

At this stage, is it beneficial for me to study Junit ?

if it is beneficial, then please me suggest some books for studying from beginner level in unit testing.

Please give your suggestions.

Thanks in advance.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33132

Unit testing is automated testing. You just get a greed or red bar rather than having to look at the results manually. See more here.

As far as books go, a short book that I like is "Pragmatic Unit Testing." It covers how to write tests along with what good practices to use. I really like the focus on WHY for a beginner.

Once you write more complex code, "Test Driven" or "JUnit Recipes" covers how to test different types of code.

[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
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
You may interest TestNG, it is better than JUnit.

SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Udaya Wijenayake
Ranch Hand

Joined: May 15, 2009
Posts: 30
This book will help you to start JUnit Testing.

JUnit in Action

SCJP 1.5
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33132

Kengkaj Sathianpantarit wrote:You may interest TestNG, it is better than JUnit.

That's subjective. In any case, JUnit is more widely used so I think it will Anuj more when looking for a job.
I agree. Here's the link:
subject: JUnit Testing
It's not a secret anymore!