commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: unit testing servlets
Date Tue, 13 Dec 2005 19:41:28 GMT
Quoting Mark <elihusmails@gmail.com>:

> I want to write some unit tests for a web site I have developed.  The front
> page of my site requires a login.  Is is possible to programatically log in
> using httpunit or cactus and then continue testing of the other servlets on
> my site?

If it is BASIC Auth, then add the following to the URL you are connecting
with...

http://username:password@www.mysite.com/

The username/password combo will be picked up by Basic Auth and used for
authorization rather than prompting for input.  If you are using form auth or
something else, I'm sure httpunit and/or cactus have ways to get you logged in.
 I just don't know, offhand, what those ways are.


Jake

>
> TIA
>




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


Mime
View raw message