Changing POST data used by Apache Bench per iteration

James Brady picture James Brady · Apr 8, 2010 · Viewed 15.2k times · Source

I'm using ab to do some load testing, and it's important that the supplied querystring (or POST) parameters change between requests.

I.e. I need to make requests to URLs like:

http://127.0.0.1:9080/meth?param=0
http://127.0.0.1:9080/meth?param=1
http://127.0.0.1:9080/meth?param=2
...

to properly exercise the application.

ab seems to only read the supplied POST data file once, at startup, so changing its content during the test run is not an option.

Any suggestions?

Answer

ceejayoz picture ceejayoz · Apr 21, 2010

You're going to need to use a more full-featured benchmarking tool like jMeter for this.