Clint Berry

Full-stack Web Developer

Wannabe Entrepreneur

Siege Testing Your Site Behind a Login

Posted on 05 Nov 2011 in Performance | 0 comments

I use Siege to test my web applications and get an idea of how much traffic they can sustain. It is a great tool and I suggest you read more about it here.

A few days ago, I needed to test a part of my application that was behind a login. I hit up UPHPU user group on IRC, and Carmony (a master website optimizer) suggested logging in on my browser and then hijacking the session in siege by setting header values. That is a great idea, but seems overly difficult. I doubted that I was the only one that ever wanted to do this. Isn’t there an easier way?

Sure enough, I found the answer on Server Fault:
http://serverfault.com/questions/292679/stress-login-area-with-siege

Siege has a setting in the .siegerc file for this very scenario, although it isn’t documented.

Simply set the login-url value with a user and password and it will login for you and perform the tests.

login-url = http://YourSite.com/login.php POST name=Clint&pass=MyPassword

So cool!

I am a full-stack web developer that is passionate about start-ups.

Latest posts by Clint Berry (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>