Reading payload from tsv file


I am new to Gatling. I am writing a test scenario where I want to read payload for each of the POST request from a tsv file. My tsv file looks something like this:


{"“payload”: {“Id”: “D85B24305BA511E3949A0800200C0000”,“a1”: “5A0C96845BA611E3949A0800200C0000”,“a2”: “S12”,“a3”: “S22”,“a4”: “INTERNAL”"}}

My scenario code looks like this:

val scn = scenario(name)








.check(status is 200)

But I am getting 400 bad request. Am I doing anything wrong?

You probably didn’t properly escaped your JSON body according to the CSV spec:
See 2.4 to 2.6.

If your JSON is { “foo”: “bar” }, then you have to write in your CSV so it’s properly decoded: “{ “foo”: “bar” }”

FYI, there’s a new feature that let one perform a simple split instead of a full CSV parsing:
Available on latest snapshot only.

So looks like it is able to read the file (console log shows so) but I am not sure if it is setting it properly in the request. I tried using

param is ONLY for form upload.
What you need is probably body.

Then, please take my previous explanations into account.

Escape character “” helped. Thank you so much for your help.