variables in the csv file name

I am trying to read the corresponding csv file according to what “tenantId” I am have:

So this is the feed I am using:


Caused by: java.lang.IllegalArgumentException: file ${tenantId}_content.csv doesn’t exist

What should I do in this situation?



No, this is currently not possible with the Feeder API. Moreover, having one file per virtual user seems like a bad idea: many files to open/close, disk accesses while running the simulation, how to maintain those files, etc.

It would probably be a better idea to have one global csv file.


The file is not per virtual user, It is per “tenancy” defined by my system. I can’t have the global csv file is because each tenancy has its own users and contents. And the users can only operate on the contents within its tenancy. If I put everything under one csv file, with the current “circular, random or queue” method, I can’t grantantee that the record I got can match the same tenancy, That is why I need to seperate those out by “tenancy”. and that number can be variable depending on the system that the performance will be targeted one.

Any suggestions?


How many tenants do you have? Can’t you have one scenario per tenant?

If the scenario is the same for all tenants is the same, except for the feeder, you can have a method that takes a feeder parameter and returns a scenario.

def scn(feeder: Feeder) = scenario(“foo”).feed(feeder)…

The scenario will be very similar, The only difference is that if the tenant Id is different, it will go to different subsequent feeders.
e.g: If tenantId = A, then it will need to go to the feed files that containing the users and contents information belonging to that tenant A.
if tenantId = B, then it will need to go to the feed files that containing the users and contents information belonging to that tenant B.

The operations on the scn will be the same, but feeders will be different (There are 1 feeder to get the different tenantIds, and subsuequent feeders like contents, users info belonging to each individual tenant).

The tenant number will between 700- 1000. And it is changes according to the requirement, So it is hard to define for each tenant one senario

So that’s exactly what I suggest: write a method that take a feeder input parameter and returns a scenario:

def scenario(name: String, feeder: FeederBuilder[String): ScenarioBuilder = ???

then create a setUp with different populations:

scenario(“tenant1”, feeder1)…,
scenario(“tenant2”, feeder2)…