Two sets of data sets for two types of injections

Sorry to trouble you guys, I’m in a performance framework creation task.
Suppose below Setup.

GET_REQUEST.inject(rampUsers(allSettings.size) during (5 minutes))
DELETE_REQUEST.inject(rampUsers(allDeleteSettings.size) during (5 minutes)))).protocols(httpConf)

can i use 2 separate data sets for the above 2 injections ?

Any Help pls ?

Hello Lahiru,

In Gatling you have the maintain a hierarchy, if you look at from bottom up, it goes as request → scenario → simulation.
So in this hierarchy, you can feed user data to scenario (where you use .feed, .inject(), etc.)
In your example, looks to me the GET_REQUEST is not actually a request (like http()) but a scenario with a single request.
So you should be able to use GET_REQUEST.feed(datasetfeeder1) and DELETE_REQUEST.feed(datasetfeeder2) with each feeder is defined independently.

Hope this helps.


Hi Pujitha,
Thanks a lot for the explanation. Let me brief my scenario.

I have a scenario which includes a collection of PUT,GET,PATCH,POST and DELETE requests where i need to execute them in a frequency as below.

def allByFrequency(implicit config: SettingsConfig) = randomSwitch(
5d → exec(putSettings),
5d → exec(patchSettings),
50d → exec(getSettings),
15d → exec(getMergeSettings),
20d → exec(getSettingsVersion),
4d → exec(getSettingsVersions),
1d → exec(deleteSettings)

but what happens here is, though i use datafeeder in random, queue or what ever, delete request process the same endpoint sometimes, so i get 404 error. To avoid that I used a separate data feeder(shuffle) only for 1d → exec(deleteSettings). Then the after sometime execution exits saying empty data feeder.

Any suggestion ? :frowning:

any idea from anyone pls ?