Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need testing the performance of the reserved area of my website. I want use Siege for this goal.

For accessing to reserved area you must be logged to my site.

How can I send with Siege a Login-Cookie to my web application ?

share|improve this question

1 Answer 1

up vote 10 down vote accepted

It's only mentioned in the default .siegerc file (and not in the online manual or man page), but:

# Login URL. This is the first URL to be hit by every siege
# client. This feature was designed to allow you to login to 
# a server and establish a session. It will only be hit once
# so if you need to hit this URL more then once, make sure it
# also appears in your urls.txt file.
#
# ex: login-url = http://eos.haha.com/login.jsp POST name=jeff&pass=foo
#
# login-url = 

So you're not exactly pre-setting the login cookie. Instead, you're instructing each siege worker to login to your site once before any other requests, and they will retain their authenticated status until siege terminates.

Alternatively, you could set the user-agent to a special string, and then watch for that special user agent in your authentication code and automatically log that visitor in.

share|improve this answer
    
It works! Thank you. –  alesdario Sep 7 '11 at 14:33
    
Awesome! Thanks so much. –  Clint Nov 3 '11 at 16:10
    
How does this work with authenticity_token, such as you find in Rails? –  ewalk Sep 5 '13 at 15:49
    
No idea... give it a shot and report back? If it's a token embedded in a hidden field in the login form, then it should work just like any other user visiting and logging in. –  Ian Sep 6 '13 at 16:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.