Looping over a feeder

I need to generate one request for each line in a csv file. Doing a loop over a feeder makes sense, except it doesn’t work the way a feeder is normally used. Normally, when the feeder is empty, the simulation terminates.

What I’m trying for is something like this:

val data_feed = csv( “survey_response_data” )

scenario( name )
.during( Test.duration ) {
feed( user )
.exec( login )
.exec( setup_for_test )
.repeat( data_feed.num_elements ) {
feed( data_feed )
.exec( submit_the_data )


Really, what I’m trying to do is use csv() to load a file into memory, then iterate over it over and over again. But each virtual user should be able to iterate over it independently, as opposed to shared. So I know the above code does not do the right thing.

So the real question is: how do you normally solve a problem like this?

Did you have a look at the feeder documentation? http://gatling.io/docs/2.0.2/session/feeder.html#non-shared-data

Ah-ha! I knew you had to have a way. Perfect!