Search code examples
groovyjmeterload-testing

How to set values of variable using postprocessor in Jmeter and use it in Preprocessor for same sampler?


My scenario is to pass different time (15 mins gap) till the script runs for each sampler run. I am using preprocessor and postprocessor in the same step and now i want to use the the variable changed in postprocessor step, in side post processor step. Below is the screenshot of code and script.

enter image description here

enter image description here

enter image description here


Solution

  • Just found out the solution. I don't need to add preprocessor here. instead just using jsr223 sampler will work fine with onceonly controller. preprocessor was resetting the starttime and endtime value here.