jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-str...@ehatchersolutions.com>
Subject Re: Cactus : Struts
Date Sun, 11 Nov 2001 21:12:55 GMT

----- Original Message -----
From: "Nick Chalko" <Nick@planetu.com>
> Good work removing the inner class.  I would have performAction return an
> action forward instead of using an class variable.

I debated on how it should be implemented, and decided upon keeping state in
instance (careful with the term 'class' variable, as that actually means a
static variable technically) variables to free the test writer from having
to do it manually, since it is extremely common to perform an action and
then assert that the ActionForward name is correct.

Also, since performing an action can affect the state of many other things
(request, session, application, for example) its not exactly a stateless
operation and I opted for letting StrutsTestCase maintain some of its own

Each testXXX method should ideally be used to independently test a single
action, and each would get a fresh start on the request scope at least.  (Is
session maintained between testXXX method calls?  Or is it controllable

I'm open to debate on if/how state should be maintained in StrutsTestCase
though.  I'd love to see other examples of how ServletTestCase abstract
extensions are written with respect to maintaining state.  Anyone know of
ones I can refer to?

> Hopefully in 2 weeks or so I will be able to continue contributing to
> StrutsTestCase.

Excellent.  I look forward to filling this out more with you.


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

View raw message