1

I'm trying to use Siege to load test a Magento site. However, it does not appear that Siege makes requests with session cookie returned from previous request. For example, in my urls.txt file:

http://dev.example.com/
http://dev.example.com/catalog/product/view/id/167119
http://dev.example.com/checkout_cart/add POST product=167119&super_attribute[92]=952&super_attribute[196]=186&qty=1
http://dev.example.com/checkout/onepage/
http://dev.example.com/checkout/onepage/saveMethod POST method=guest

It would be nice if Siege would use the frontend cookie Magento returns when it accesses the first url above, the home page, and resend that cookie when it requests the second url above, the product page. Is this something siege can do?

David Tay
  • 131
  • 4

2 Answers2

2

As per Siege FAQ it should be supporting cookies

Netscape cookie support was added to siege-2.00; it does not support RFC 2965 cookies. This feature was “Microsofted” in that it shipped with a known issue: siege ignores path information and returns cookies based on server and domain. All cookies will be discarded after the run, they are not stored locally on disk. Cookies will be expired during the run as per the Netscape expire directive. The primary concern with regard to cookie support was to maintain state with the server. Siege supports that feature nicely.

So I would suggest inspecting the cookies you're getting from Magento, and if they are not Netscape-compatible, I'm afraid you will have to consider another load testing tool, check out Open Source Load Testing Tools: Which One Should You Use? article for the most prominent free and open source load testing tools listed and compared.

Dmitri T
  • 551
  • 2
  • 2
1

As per this link in the accepted answer in this Stack Overflow article:

Log in as a user on your Magento website, search for the frontend cookie, and use its value like below:

siege -f urls.txt --header="Cookie: frontend=<your_cookie_value>"

You can have an Add To Cart GET URL like this, that works very well:

https://www.example.com/checkout/cart/add?qty=1&product=1234&form_key=QUJtnTxCYNtsiC0k

Note, in default Magento (1.x) setup, it may redirect user to the Cart page, in which case Siege will show this as a 302 redirect. Product will be added to cart nonetheless.

Hope this helps you out.

hiteshspac
  • 11
  • 1