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 )
}
data_feed.rewind
}
`
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?