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 Unit Testing for Java and JSP 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 "Unit Testing for Java and JSP" Watch "Unit Testing for Java and JSP" New topic

Unit Testing for Java and JSP

Viji be

Joined: Aug 16, 2004
Posts: 23
Can anyone suggest me the approach for testing the JSP,Java classes using UNIT testing?

Please do give me some examples for the same.

Gian Franco
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Hi Viji,

You should try to use HttpUnit. It works perfectly for
me, better than HtmlUnit for what I need it.

Try to get hold of the book "Junit Recipes" it gives
very good hints for unit testing for a broad range of

hth, cheers,


"Eppur si muove!"
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Put as few logic into JSP's as possible. Delegate to POJOs or custom tags.

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: Unit Testing for Java and JSP
It's not a secret anymore!