Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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.

share|improve this question
    
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 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 at 12:33

2 Answers 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.

share|improve this answer
    
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 at 19:34

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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