jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Ivey" <cbi...@comcast.net>
Subject RE: Cactus or JUnit
Date Wed, 24 Mar 2004 15:29:30 GMT
I think I've answered my own question by RTFM.  From the Cactus
documentation:

Your test case class should extend ServletTestCase whenever you are unit
testing:

Servlets,
Any java code that uses Servlet API objects (HttpServletRequest, ...)

If anyone has anything to add please do so.  Otherwise, thanks.

-----Original Message-----
From: Brian Ivey [mailto:cbivey@comcast.net]
Sent: Wednesday, March 24, 2004 10:08 AM
To: Cactus Users List
Subject: RE: Cactus or JUnit


Actually the object does require a request and response object.  Does this
mean JUnit is not the best option?  If yes, then what should I use?

Thanks again,
Brian Ivey

-----Original Message-----
From: David Plass [mailto:DPlass@TCICREDIT.COM]
Sent: Wednesday, March 24, 2004 10:04 AM
To: Cactus Users List
Subject: RE: Cactus or JUnit


Yes, I'd agree.  If your server-side object can be instantiated outside the
server (i.e., not an EJB), and it doesn't require session/request/response
objects, by all means, use Junit.

"Use the simplest test framework that works".

Thanks
--DP


-----Original Message-----
From: Brian Ivey [mailto:cbivey@comcast.net]
Sent: Wednesday, March 24, 2004 9:30 AM
To: Cactus Users - List
Subject: Cactus or JUnit


I am new to Cactus, JUnit, and StrutsTestCase.  In fact, this is the first
time I've attempted to perform any structured testing.  I've successfully
written some Struts test cases.

My question is basically one of design.  I am trying to test a server side
object that is neither a Servlet, JSP, or EJB.    It contains no Struts
code.  It just contains an algorithm for building an HTML menu.  My first
guess is that JUnit should be used.  Would anyone agree with this?

Also, in the application I am testing Session IDs need to be passed between
pages.  Is there a best practice for storing this in my testing package for
reuse among the different test cases?

Thanks,
Brian Ivey


---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org


Mime
View raw message