I am working on a hybrid framework having UI as well API test steps in TOSCA, I am facing an issue where my API Test Steps fails intermittently due to 401 Authentication failure. I want to retry this failure 3 times before termination my script as it works on retry.
I have added Do loop in my test step, in the loop part i have added my Request and Response and in the response i am capturing Response Code in buffer. In the codition i am verifying that ResponseCode is != 200 OK then run the loop for 3 times.
Now i am facing this problem as in case of failure the loop response itself fails due to other parameters not getting found in the response and my loop is not running again. Please help how to resolve this issue, so that in case of any failure other than 200 OK the steps will retry for 3 times.
PFA screenshot of scratchbook where it is failing. enter image description here