Testing a website with HTTPS login and cookies

Hari Sekhon hpsekhon at googlemail.com
Tue Sep 5 08:38:03 EDT 2006


Hi everyone,

I want to create a test that will do a proper login test to a web site 
but I need some pointers.

I need to login to the website by accessing an https url and posting to 
that, which should return a very small 302 reply with the address of the 
internal page. I need to take that page href and then access it, if I 
can do all that then the test passes. Of course because I have to access 
two urls I also need cookies for session handling. I've already tried 
bash which would have worked but for the cookie handling and webinject 
which is written in Perl, but this doesn't do exactly what I want in 
terms of output so I'd rather write something myself. (I'm also curious 
as to the best way to do this)

If anybody knows how to do this could they please give me a quick 
pointer and tell me what libraries I need to go read up on?


Thanks

Hari



More information about the Python-list mailing list