1

I want to hit an get API by putting in for loop because in the first hit I wont get entire response. I want to keep on hitting the API continuously and check if expected value contains in the response or not. My expected value may come at 2nd hit or it may come at 4th hit. I cant use hard delay I want to put it in loop and check if my expected value comes in response then I will exit the loop.

1 Answers1

0

This is exactly what retry until is for. Please read the docs: https://github.com/intuit/karate#retry-until

Since this may be tricky if you are very new to Karate, refer this answer also: https://stackoverflow.com/a/55823180/143475

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248