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/
fv 1 password YOURPASSWORD
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.
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.