Parametrization of virtual users (in Gatling 2)

I googled a lot on how to parametrize the script to accommodate more virtual users in test scenarios(Gatling 2). There is documentation for feeders(csv,json, etc…) The recorded script will have a text file generated in the “request-bodies” folder. So feeders are not helping here. Do I need to make edits to that file in order to serve the purpose as shown below(say for 5 users) -


is there a better/correct way to do this?

Please help me out, been weeks I got stuck here :frowning: Had to post since I couldn’t find a way out after considerable amount of research.

Feeders are simple and straightforward -


  1. Create a feeder file (parameter) eg: users.csv.
    uid1, pwd1
    uid2, pwd2 …

  2. Save this file in data folder of gatling_home

  3. In your scripts declare feeder. eg: val userFeeder = csv(“users.csv”) .random // you can use circular also. look at documentation for all options

  4. before your exec chain, where you need to use these uid,pwd, call this feed(userFeeder).exec …

  5. In your exec chain, call the parameters ({“login”:{“username”:"${userName}","${userPwd}":“hhjhjj”}} //First line in the parameter file is used as parameter variables


First off, thank you for post and sorry for the late reply. I followed the same as you have mentioned and Gatling threw an error in the end.
"Failed to build request: Illegal character in path at index 16: xyz.txt".
Am I missing the correlation part? If so, can you please explain that as well in simple terms like illustration with an example? Would be of great help!

It seems like you have an illegal character in your feeder file. See if you can find an issue there. If not, post your code and feeder file and will take a look at that.