You don't need to even bother with Cactus if you aren't using anything HTTP-specific, e.g., javax.servlet.HttpSession, which makes things even easier. You can just use JUnit as always. As long as webwork is in the classpath for your tests you are set.
Jed ----- Original Message ----- From: "Frank Febbraro" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 18, 2004 16:16 Subject: Re: [OS-webwork] Unit-testing actions in WW1.3 > Using 1.4 > > For what it is worth, I use cactus, and have a WebWorkTestCase that extends > ServeltTestCase and all of my action tests extend that. > > My tests call super.setUp() and tearDown() and the super does thing like > initialize the ActionContext and such. Even makes for ways to add parameters > and such. However, parameters dont get magically populated on my actions, I > set those directly on the action then call doXxxxx (we are all command > driven over here) > > Hope that helps... > Frank > > ----- Original Message ----- > From: "James Pan" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, February 17, 2004 9:34 AM > Subject: [OS-webwork] Unit-testing actions in WW1.3 > > > Hi, > > I have a base class from which all my actions extend. This base class uses > ActionContext to read properties file, initialize database connections, and > so on. > > Now, when I create a new action, how can I unit-test it? I haven't tried it > because the idea seems absurd to me, but do I need to have some sort of > webwork framework running somewhere in order to do this? How do I retrieve > the context to read the properties file? What else should I be aware of?? > > I'm sorry. I have no clue. Please help! Thank you!! > > James > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id56&alloc_id438&op=ick > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork