excilys/gatling — pull request #548 by krishnenc (2012-06-07 17:08:38+00:00)
Title: ByteArrayBody + Redis Feed

I added a couple of features that i needed and which are not currently implemented from what i have seen:

(1) Possibility to inject a Byte Array body in each HTTP request . The use case is that i am load testing a web service that accepts protocol buffer in the HTTP POST Body.
Example usage:
https://gist.github.com/2888208
I send a callback function in the scenario which is called each time the http body needs to be defined. I also set the Content Length on the fly since it may vary for each request.

(2) Possiblity to use redis as a feeder for Gatling. I found it a bit tedious having to load all the data in Gatling itself before running the Simulation especially for millions of requests.
Redis allows for Mass insert of keys now (http://redis.io/topics/mass-insert .btw its crazy fast to load millions of keys!)
The data to be used in a simulation is loaded on a redis list and popped out for each request and placed in a session variable corresponding to the name of the redis list.
Redis feed simulation example usage:
https://gist.github.com/2888230

For now i've implemented only queue feeder, but the other two should not be too hard to implement.
The above functionality is in a separate module: gatling-redis
I have added a dependency on the following redis client : https://github.com/debasishg/scala-redis

Please review and let me know if any changes are required

Cheers,
Krishnen