JMeter 5.4.1 – HTTP Sampler – Only runs 14 loops/Iterations when using fixed Thread and Loop numbers that are greater than 14 iterations

Viewed 24

Test: Thread Group A with a Single HTTP Sampler:

  • It uses JMeter Properties for Thread and Loop number values -No Duration or Thread LifeTimes are set just ramp up.. -The values are in defined in the Test Plan UDV.’s or with Thread and Loop numbers being initially defined in external user.properties files, and are manipulated at runtime via a setUpThreadGroup before the TG with issues here.

Number of Threads: ${__P(My_Number_Of_Threads)} – can be varied at runtime by setUpThreadGroup Ramp-up: ${My_Ramp_Up_Time} – set to 0 Loop: ${__P(My_Loop_Count)} – can be varied at runtime by setUpThreadGroup

Using a My_Loop_Count = 5 : enter code here(1-2 etc = ThreadNumber-SamplerNumber) enter code here1 Thread: 1-1:1-5 = 5 iterations as expected enter code here2 Threads: 1-1:1-5 2-1:2-5 = 10 iterations as expected enter code here3 Threads: 1-1:1-5 2-1:2-4 NO 2-5 3-1:3-5 = 14 NOT 15 iterations enter code here4 Threads: 1-1:1-4 NO 1-5 2-1:2-3 NO 2-4:2-5 3-1:3-4 NO 3-5 4-1:4-3 = 14 NOT 20 iterations run

Using a My_Loop_Count = 25, again it runs only 14 iterations.

  1. Any ideas as to why this is happening? It is not time related, but iteration somehow (I even checked the .jmx via Notepad to hunt for my elusive 14, but none existed). UPDATE - the issue was a csv data file element with 14 items in it! Now set to 'rewind on end of file'
  • reason: org.apache.jorphan.util.JMeterStopThreadException: All records in the CSV file have been passed.
  1. To aid in a more in depth hunting in the future, is there a way to see the actual runtime ThreadGroup's Thread Properties values that are being set/used to console?
1 Answers

We cannot state anything meaningful without seeing how do you "manipulate at runtime via a setUpThreadGroup" and how do the properties look like, you can try adding a Debug Sampler to see the effective values.

I would recommend checking jmeter.log file, it normally contains entries regarding threads start/stop events and if you enable debug logging you will see what's going on under the hood

Also be aware that according to JMeter Best Practices you should always be using the latest version of JMeter so consider upgrading to JMeter 5.5 (or whatever is the latest version available at JMeter Downloads page) on next available opportunity

Related