Dynamic feeders - help!

I have a method that generates data and writes to a csv file in before method

val outputFile = new BufferedWriter(new FileWriter(“src/test/resources/primarycompany.csv”))

val csvWriter = new CSVWriter(outputFile, ‘\n’, CSVWriter.NO_QUOTE_CHARACTER)


def createContact(): Unit = {
var noOfContacts: Int = 3
listOfRecords += csvSchema
for (i ← 0 until noOfContacts) {
api.data = new JSONObject
response = api.createContact(path, 201)
ContactID = response.path(ContactsEnum.mcr_contact_id.keys)
listOfRecords += GetStringArray(primaryContactIDList)

As seen above am writing the values to primarycompany.csv

I wanted to use this file as feeder but "Feeder source is empty" though it has values in it.

Help pls!

The content of this e-mail is confidential and is intended solely for the use of the individual or entity to whom it is addressed. If you have received this e-mail by mistake, please reply to this e-mail and follow with its deletion. If you are not the intended recipient, please note that it shall be considered unlawful to copy, forward or in any manner reveal the contents of this e-mail or any part thereof to anyone. Although Freshworks has taken reasonable precautions to ensure no malware is present in this e-mail, Freshworks cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments.


First, before hook is run after the initialization and “before” the actual simulation (see the lifecycle).

The feeder is initialized before the before hook and then has already check that the source is empty or not.

Solution: you should use the batch loading mode

But, sadly, we had an issue with this loading mode, and we fix in the next release.
You’ll find the fix in Gatling 3.5.0 (release in progress)


Great! Thank you.