"undefined is not a function" error when feeding my simulation with .json/.csv file

Your CSV sample was almost correct, except for the missing import and the path.

Your JSON sample has way more errors:

  • you must pass a StringBody (or another “Body” type) to body() => StringBody(your function)
  • it’s not jsonFeeder but jsonFile, see Gatling session scripting reference - feeders
  • missing imports for StringBody, feed, jsonFile

I’m not a JavaScript developper, but I would expect all these errors to be better reported when using TypeScript.