OpenID fresh auth can be slow

I’ve been thinking of how to test Web applications lately. Since I’m playing with OpenID I wrote a unit test using twill which I discovered with this post on web.py mailing list.

So I am running the consumer.py example from python-openid and here is what the test case looks like:

monty$ cat t.twill
#debug http 1
go http://0.0.0.0:8001
code 200

fv 1 openid_identifier http://YOURUSERNAME.myopenid.com/
submit
code 200

fv 1 password YOURPASSWORD
submit
code 200

find successfully

Fill in your openID details and lets try it with twill:

monty$ time ./twill-sh t.twill
>> EXECUTING FILE t.twill
==> at http://0.0.0.0:8001
Note: submit is using submit button: name="None", value="Verify"
Note: submit is using submit button: name="None", value="Sign In"


1 of 1 files SUCCEEDED.

real 0m33.065s
user 0m0.920s
sys 0m0.100s

33 seconds! Ok, I’ve run this a couple of times and it can be low as 17 seconds or it is usually in the mid-twenty seconds somewhere. So I wish that was a little faster.

Found any of my content interesting or useful?