Yes.  I have done exactly that: manually simulated a logged-in session by

1. Building a "user" object (either from database or "by hand")

2. Put the user object into session in the setUp (or testXXX) method.
Remember, the 'beginXXX' methods are NOT run on the server side so you want
to do this part in the setUp or testXXX methods.

GL

Thanks
--DP


-----Original Message-----
From: Thulasiram Dharman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 30, 2004 12:40 PM
To: [EMAIL PROTECTED]
Subject: Using Cactus to test applications requiring login


Hi,

I am trying to use Cactus to write test cases for a web application that
requires the user to login. I'm having some difficulty writing test case for
testing my module after logging-in first.  The login module is different
from the module I'm trying to unit test. However, the user information that
is stored in the session following a successful login is required by the
module I'm trying to test.  Before I begin to delve any deeper into the code
that I have written so far, I would like to get an idea on whether or not
this scenario can be tested using Cactus-Junit.  If this is a possible to
test using Cactus, it would be very helpful to me if someone could give me
some pointers on how to write tests for a web application that requires
users to log-in first.

Thank you.

Regards,
-Ram Dharman

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


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



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

Reply via email to