Apache Bench – Setting Multiple Cookies

by Jason on October 12, 2011

Recently I’ve been doing some load testing on some web applications I’ve developed.

Reading the documentation they say you can set multiple cookies using multiple “-C” flags. However, this simply DID NOT WORK for me. Tried everything.

Since I’m sure others have run into this I’m offering an alternative.
Simply set the Cookies in a header.


ab -c 5 -n 100 -H “Cookie: PHPSESSID=115821732; another_cookie=asdfasdfasdf”

Happy load testing!