0
votes

I have the following Test Plan:

  • Test Plan
    • Thread Group
      • Java Request
        • CSV Data Config Set

My Thread Group has 1 thread looping forever. To my understanding, the thread should go down the CSV file line by line, 1 line per loop. However, it stays on the same first line. If I have two threads, then the first thread will stay on the first line, second thread on the second line, and so on.

I have tried all the different options in CSV Data Config Set (even if it doesn't make sense to try those options) including:

  • Checked path to file is correct
  • Tried file encoding as empty, UTF-8, UTF-16
  • Checked delimiter was correct in CSV
  • Checked variable names were correct
  • Allow quoted data true and false
  • Recycle on EOF true and false
  • Stop thread on EOF true and false
  • Tried all sharing modes

I also ensured the CSV file had no empty lines. I am using JMeter 2.13 and the line break character in the CSV is CR LF if that helps.

I've looked at tutorials and other JMeter questions on here, it seems that by default the threads should go down the CSV file. I remember it was behaving properly awhile back, unsure when it started behaving this way.

1
Welcome to SO! When you place a question try to add a minimum content: input sample, expected output sample, what did you try, research and where are you stuck. What did you try? Show us your code. - David GarcĂ­a Bodego

1 Answers

0
votes

It is hard to say anything without seeing the code of the Java Request sampler to read the variable from the CSV and your CSV Data Set configuration.

  1. If you want each thread to read the next line from the CSV file each iteration you need to set the Sharing Mode to All Threads
  2. Try using other sampler, i.e. Debug Sampler as it might be the case your approach to reading the variable from the CSV file is not valid
  3. According to JMeter Best Practices you should always be using the latest version of JMeter and you're sitting on a 4-years-old version, it might be the case you're suffering from an issue which has been already fixed so consider migrating to JMeter 5.1.1 or whatever is the latest stable JMeter version available at JMeter Downloads page