0
votes

Goal is to set the following and run a test plan with a "Thread Group" and "CSV Data Set Config" with 1000 lines/user accounts. So in 20 mins i want 10 threads to go through my 1000 line long csv file.

I set these settings in GUI mode and it does what i want:

Thread Group .

  1. num of threads - 10 .
  2. LoopCount=Forever .
  3. scheduler=on .
  4. duration=7200 .

"CSV Data Set Config"

  1. Recycle on EOF? - False
  2. Stop thread of EOF? - False
  3. Sharing mode=All Threads

The problem is that i can't reproduce these setting from non_gui mode. I run it as follows and it only goes through # of csv lines equaling the # of threads set. So if i set 20 threads it will go through 20 lines of a file and exit.

  1. -Jseconds=1200
  2. -JthreadCount=20
  3. -JcsvFile=../../user_files/j2kUsers.csv
  4. -JloopCount=???
1

1 Answers

0
votes

Use -1 as the property value, Thread Group has a Loop Controller under the hood and as per documentation:

The value -1 is equivalent to checking the Forever toggle.

You can also put the values to user.properties file like:

seconds=1200
threadCound=20
etc.

to avoid entering the values each time you run the script, the values van be overriden via -J command line argument at any time.

More information: Apache JMeter Properties Customization Guide