2

I'm trying to create a test with JMeter to log in many users and test a website. Each user has a username, a password, and a special id number. The associated id number needs to go into the URL for some requests from that user.

I had thought that I could create a CSV file to read these variables, like this:

username,password,id
username2,password2,id2
username3,password3,id3

However, that doesn't seem to work. I put the CSV Data Set Config element directly under the Test Plan because I want each line to be a thread (each thread representing a separate user who is making several requests). I also tried moving it to be a child of the Thread Group. The username and password seem to be working alright (they are in the first request, to log in), but I am getting <EOF> in requests where I reference the id. Where have I gone wrong?

I am currently only trying this with one user to get it working. There are no extra line feed characters, the csv file consists only of a single line, two commas, letters and numbers, no spaces. I'd already checked that because I found someone with an <EOF> problem who said they'd been getting it for that reason.

2
  • What editor are you using to create the csv file? If you open it in notepad++ or an editor like that where you can view white space characters, try making sure you don't have any extra line feed characters or anything like that.
    – Sam Woods
    Jul 1, 2014 at 21:53
  • @SamWoods I'm using notepad, but I'd already checked for whitespace characters. I opened the file up in word and turned on the non-printing characters just to double check, but the only one is the end of the single line. I don't think that's the problem.
    – Tajha
    Jul 2, 2014 at 12:33

2 Answers 2

2

In regards to placement, you need to provide enough iterations to CSV Data Set Config so it could go for 2nd and further lines. So it makes sense to put CSV Data Set Config as a child of a Thread Group or Loop Controller.

Regarding id bit. Any change that username and/or password contains comma? If so, you may have to check "Allow quoted data" to work it around.

See Using CSV DATA SET CONFIG guide for more details. If anything is unclear update your question with CSV file content (can be partial) and your CSV Data Set Config details.

1
  • Nope, no commas in the username or password. My original question has an example of the csv file content. I have also tried it as a child of the thread group, and the problem is still the same. I'm only trying to do it for one iteration, one thread, right now just to get it working. I have already read that guide and found it unhelpful in finding out why I am getting <EOF> for my third variable. I only turn to asking somebody when my googlefu fails me for too long.
    – Tajha
    Jul 1, 2014 at 19:34
2

Alright, I feel dumb. Apparently I was wrong about the user and pass working. That was also sending EOF, but that part wasn't failing. I found the answer here to be very helpful. I believe I had the thread sharing set wrong. It seems to be working now.

1
  • That's good news if it is working now, but you should not add this as a answer, you could have added it as a comment to your question.
    – Dhiman
    Jul 28, 2015 at 23:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.