Hi James,

You have to log your application in your test fixture. "Logging in"
depends on your framework. It may be as simple as setting an HTTP
session attribute.

-Vincent

> -----Original Message-----
> From: James Black [mailto:[EMAIL PROTECTED]
> Sent: 25 December 2003 01:03
> To: [EMAIL PROTECTED]
> Subject: re: unit testing a webapp that requires prior logging in
> 
> Hello,
> 
>   I am starting to work with cactus, as I have an application to unit
test
> that has various jsp pages and java classes in the classes directory.
> 
> 
> 
>   In order to do the tests the program needs to be logged into the
> application framework first, and that causes me some difficulty.
> 
>   I know how to log in using httpunit, but I don't know how to use
that
> WebConversation instance for the rest of the unit test.
> 
> 
> 
>   How do I approach this?  I hope my question makes sense.
> 
> 
> 
>   Also, how do I integrate in the strutsunittest framework with
cactus, or
> do I need to use different frameworks for the different parts? It
would
> seem
> that I use httpunit to test the browser side, strutsunit for all of
the
> forms and cactus to test the parts that are called by the struts
action
> controller.
> 
> 
> 
>   Thank you for your response.
> 
> 
> 
> "If a man does not keep pace with his companions, perhaps it is
because he
> hears a different drummer.  Let him step to the music which he hears,
> however measured and far away." - Henry David Thoreau
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to