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:
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