I’m trying to test using an entire set of data. I do not seem to find a proper feeder strategy for that.
Queue strategy would stop the simulation with an error when the collection of data is exhausted (“next on empty iterator”)
Random strategy does not guarantee that all the data will be used once and only once
Circular strategy does not come with a limit, forcing me to know in advance the number of elements in my data (is there a way to do that?)
Concurrent Queue strategy is not much different from Queue strategy in this context
Am I missing something? Is there a way to know how many elements are available?
Let’s say you use csv(“foo.csv”), it actually returns an Array[Record], so you can get its length with… “.length”
Hm… I am surely missing something, but the type is actually (in 2.0.0M3) an AdvancedFeederBuilder[String], so I get a “value length is not a member of io.gatling.core.feeder.AdvancedFeederBuilder[String]” error.
That said, I did find that I can get a data() method, which is an array:
That still fails after a while with a “next on empty iterator” error, but I guess it could be coming from something else.
But why don’t you plug your number of users on the data length?
You mean, hard-coding the number of rows in the simulation code? Essentially because the feed data will change in time. So I separately have a script that regularly re-generate the ids.csv file.
I mean for example:
val feeder = csv(“foo”)
Oh, I see.
Well, my goal is to get each users to use all the values in the feeder. As far as I can tell, the code you propose would only allow me to use one value per user.
I lacked this information
See answer in the other thread.