0
votes

I have recorded a test script for user authentication and am trying to send data by using a CSV file. I have tried this previously for a post request and the parameters were being sent fine but it doesnt seem to be working for the test script.

The error i get in my response body from the result tree is: {"EXCEPTION":"com.google.gson.JsonSyntaxException","ERROR":"com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 16 path $.username"}

Attaching screenshots below for you to understand better.

Variables I've set for authenticate call

Settings for my CSV Data Set Config element

1
how your CSV looks like? does it have a header row? - user7294900
@user7294900 you mean names of the columns by header row? if yes, then no, i didnt add them. I directly added username and password in the format -> username, pass - Saman
@user7294900 the format is in a single column and it worked fine on a basic post call i sent. - Saman
do you use infinite loop in thread group? then move CSV Data Set Config as child of thread group - user7294900
@user7294900 No, i only increase the number of threads acc to the no. of users i want. And yes ive tried with CSV Data Set Config as a child of thread group as well as the HTTP request for authenticate and both give me the same error. - Saman

1 Answers

0
votes

We cannot help without seeing:

  1. First 2 lines of your CSV file
  2. Whether the variables are getting read by JMeter (output of the Debug Sampler)
  3. What request is actually being sent to the server (Request -> Request Body) tab of the View Results Tree listener
  4. Any suspicious entries from jmeter.log file

if you won't be able to figure out what's wrong using the above hints - update your question with all the mentioned data and we'll try to assist