0
votes

I have a scenario which has 10 transactions and say 50 requests. I have to handle a situation if any request gets fail in any of the transaction controllers, it should go back to say Request-3 and then the subsequent requests.

Below is the screenshot for reference: Here we have 4 transactions,now if transaction-2(Archives) gets fail, it should go back to execute homepage and then again archives and so on. The issue is I can not just give flow control action in one sampler as the case is "If any request gets failed it should go back to homepage".

enter image description here

I tried solution given in Jmeter loop again if at least one request fails but I want to start the loop for same thread.

Please suggest a solution which can be applied in once for all the requests.

1

1 Answers

0
votes

From your description it's not very clear what you're trying to achieve so I'll give you 2 options:

  1. Use Flow Control Action sampler which have various behaviors, i.e. "Go to next iteration of Current Loop" seems suitable

    enter image description here

  2. Put all your "transactions" into Test Fragments and use Module Controllers for referencing these fragments, this way you can build arbitrary flow, see Easily Write a GOTO Statement in JMeter article for more details.

The "failed" request/transaction can be caught by If Controller and ${JMeterThread.last_sample_ok } pre-defined variable