0

I have updated hc.parameters file with httpclient4.retrycount and httpclient4.request_sent_retry_enabled to true and uncommented hc.parameters in jmeter.properties file. I would like to do retries for failed requests getting 500, do I need to have script to trigger this on 500 status code or having the hc.parameters will trigger retry. Is there a way to check the retry requests from the jmeter log.

Saran123
  • 3
  • 1

1 Answers1

1

You're looking at the wrong place, if you want to retry the request if it gives 500 - put it under the While Controller and use the following __jexl3() function as the condition:

${__jexl3("${code}" != "200",)}

enter image description here

Then extract the request status code into ${code} JMeter Variable using Regular Expression Extractor:

enter image description here

This way While Controller will continue running the request until status code becomes 200:

enter image description here

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thank you very much, Dmitri. Can please let me know how to do this at thread group level especially the status code extraction part to have this retry across the thread group request but not limiting one request. – Saran123 Dec 08 '21 at 21:30