Check out www.junit.org. There is a link to a J2EE test add-on for JUnit
(http://sourceforge.net/projects/j2eeunit/) , which I have to be honest, I
haven't used yet. Normally, what I have done is to create test versions of
the response and request objects, and treat the servlet like any other class
passing my own objects in as parameters. A web server should not be needed
to do this, although I know the J2EE add-on mentioned above says it needs a
web server...?

Hope this helps. There is a chapter in the Wrox Press Java Server
Programming J2EE Edition book (Chp 27) specifically on JUnit testing with
J2EE technologies, and downloads available at
http://www.wrox.com/Books/Book_down.asp?sub_section=1&isbn=1861004656&subjec
t=Java&subject_id=13 although I expect they'd prefer you buy the book too.

Andy

----- Original Message -----
From: Ed Goodwin <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 22, 2000 06:10
Subject: XP testing of servlets


> my group at work has recently begun using the XP programming methodology
> (Xtreme Programming for those who care...http://www.xprogramming.com/ for
> more info).  Anyway, as part of the design process you are expected to
> create automated test scripts for each piece of code you write (i.e. each
> method should have an associated test, stored in a suite of tests for each
> class, stored in a suite of tests for the system components, etc.)  To do
> the tests I have been using JUnit and found it to be very useful...
>
> However, a large part of our system is designed around servlets and my
> question is this: Is there either an add-on for servlets for JUnit that
will
> allow us to write automated tests? If not, does anyone have any
suggestions
> on how to mimic the web server environment in a way that would allow the
> creation of automated, stand-alone tests for servlets?  If someone has
used
> XP on a servlet project and can offer advice it would be appreciated.
>
> Thanks,
> Ed Goodwin
>
>
>
>
>
> _______________________________________________________
> Say Bye to Slow Internet!
> http://www.home.com/xinbox/signup.html
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to