Context:
- Using JMeter 5.4.3
- Using JenkinsFile for setup
- Jmeter Thread group in .jmx has the below snippet:
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Test" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">${__P(Linf1,1)}</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">${__P(Tinf1,1)}</stringProp>
<stringProp name="ThreadGroup.ramp_time">${__P(Rinf1,1)}</stringProp>
<boolProp name="ThreadGroup.scheduler">${__(TSch,false)}</boolProp>
<stringProp name="ThreadGroup.duration">${__P(Dinf1,60)}</stringProp>
<stringProp name="ThreadGroup.delay">1</stringProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
</ThreadGroup>
From the above TheadGroup section - I am facing issue with ThreadGroup.scheduler
I am trying to parameterise this using ${__(TSch,false)} where the JenkinsFile -
- Accepts user input from Jenkins with theseparameters
- And execution happens with the below usage :
jmeter_path/${params.testPlan} -GTinf1=${params.jmeterThread} -GRinf1=${params.jmeterRamp} -GTSch=${params.testScheduled} -GLinf1=${params.jmeterLoop} -GDinf1=${params.jMeterDuration} -Gconstant_throughput=${params.jmeterCT}
Issue am facing is from -GTSch=${params.testScheduled}
When I provide input as either true/false. It is not working as intended.
Example : I am giving the below details from Jenkins.
The script is running indefinitely as the loop given is -1 which led me to believe that schedule param is not working as intended.
Please note - When I hardcode the scheduler value in jmx with true/false or change the tag to intProp and update it as 0/1. The script works as intended.
Unfortunately this is not something you can control using JMeter properties as of JMeter 5.4.3, the options are in:
threads_schedule
special property