Byte Array Body + Redis Feed

Hi Guys,

Been using gatling for my load testing so far and its working great.

However there are a couple of problems that i faced and which are not currently implemented from what i have seen:

(1) Possibility to inject different Byte Array bodies to each individual request . The use case is i am load testing a web service that accepts protocol buffer in the HTTP Body via POST
I want to send a different one for each request.
I wanted to be able to do something like this :
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 needed to 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 . (Its crazy fast to insert millions of keys!)
I wanted to load the data to be used in a simulation on a redis list and pop out for each request and place it in the session.

This allows be to define me to define a redis backed simulation like this:
https://gist.github.com/2888230

For now i’ve implemented only queue feeder , but the other two should not be too hard to implement.

I have implemented the functionality above in my fork. Although i have place everything in gatling-core right now, i believe this should be implemented as plugins outside of the core.

The relevant commits are :
https://github.com/krishnenc/gatling/commit/0d85b0fab997ebbb0e2624580282303c2cc77a06

https://github.com/krishnenc/gatling/commit/e2065eca27d0820f1031137ee6a192dba3039850

(redis protocol function)

Can you please have a look and let me know if these are viable/relevant features for gatling or indeed if you think it is implemented correctly?

Kind Regards,
Krishnen

Hi Krishnen,

Thanks for these two new features. They surely are helpful :slight_smile:

For us to take your changes, could you please create a pull request based on the latest master please ?

Cheers,

Romain

Hi Kristen,

Those new features look very cool, thanks!

However, I’d rather have redis support into to a dedicated module, just like gatling-jdbc.

Cheers,

Stephane

2012/6/7 Romain Sertelon <bluepyth@gmail.com>

Hi Guys,

I will move the redis feeder in a separate module and send a pull request as requested.
Thanks for your response.

Cheers,
Krishnen

Thanks a lot (and sorry for misspelling your name)!
In a similar fashion, we’ll probably add MongoDB support someday.

Cheers,

Steph

2012/6/7 krishnen chedambarum <krishnenc@gmail.com>

Hi Romain/Stephane,

Sent pull request : https://github.com/excilys/gatling/pull/548

Cheers,
Krishnen