CSV Feeder, not for the request but for the workload

Hello,

I have a question about CSV feeder (or not :slight_smile: ).

I want to create a workload scenario based on data stored in a .csv file.
I don’t want to use the data to feed the requests of my scenario but to feed the scenario itself.

Basically, my .csv file contains only one column which is the number of user I want to inject iteratively in my scenario.

For example, myTestFile.csv looks like this:
users
50
100
75
100

And this is the basic scenario I want to execute for each user:
val scn = scenario(“MyScenario”).exec(http(“homepage”).get("/"))

What I want to do is read my .csv file line by line and execute this command in my scenario:

setUp(
scn.inject(
constantUsersPerSec(line.value) during(30 seconds) randomized
).protocols(httpConf)

So I want to inject 50 users for 30 seconds then 100 users for 30 seconds and so on…
I’m not sure if it’s the purpose of CSV Feeder, if it’s not, then what are the other options ? #notAScalaExpert

Thanks in advance.

Simon

You can use the Feeder just a CSV parser if you’re lazy, but you can parse it on your own.
Then, inject takes an Iterable, which you can produce by mapping on your CSV entries. #teachAManHowToFish