I have a CSV File with hundreds of records which I am using in the HTTP Sampler with Multiple Threads now sometime or multiple threads returns an error which I am OK but I want to retry in case we don't have ResponseCode 200 which I am extracting but not sure how to retry just that Request only and also I want to limit the tries to 5
I have tried using the while controller with Counter but somehow not able to get this right. Please help.
You need to define the Exported Variable Name
in the Counter otherwise it doesn't make any sense:
You need to use vars
shorthand for JMeterVariables class instance in your __groovy() function to get both Counter
and Success
variables values
${__groovy(vars.get('Status') != 'Success' && (vars.get('Counter') as int) < 5,)}
Since JMeter 3.1 you should be using JSR223 Test Elements and Groovy language so consider replacing your Beanshell Assertion with JSR223 Assertion