File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Unit test jsps? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Unit test jsps?" Watch "Unit test jsps?" New topic

Unit test jsps?

Marya Doery

Joined: Dec 27, 2000
Posts: 15
Anyone know a good freeware tool or simple procedure for unit testing jsps?
For example, I have a jsp with one text entry field that is used to search a database. I have several example cases that I know work currently; I can test them by entering them manually and checking that the resulting page is as expected.
Is there some application that can "drive" the jsp with my fixed input and check that the output is correct?
Julia Reynolds
Ranch Hand

Joined: May 31, 2001
Posts: 123
JUNIT has a couple of plugins that you may be able to use:
Marya Doery

Joined: Dec 27, 2000
Posts: 15
Thanks. I've been investigating HttpUnit ( So far it seems to work, but I'm concerned that it may break on the javascript in my pages (the faq says javascript is not supported). I'll have to test it some more. I see that HttpUnit can be made to work with JUnit so that may be an ideal pairing. I'd be curious to know if anyone has experience with any other tools.
I agree. Here's the link:
subject: Unit test jsps?
It's not a secret anymore!