Retrieve results of HTTP response body check (bodyString)


I need to put a HTTP response body check and need to re-execute same request till expected text found in response body (check pass). So same request should be re-executed till check passes.
I have put check and that works fine (if check fails it gives details in reults\log) but dont know how to re-run same request till check passes.
Please help me.


Have you tried .optional in checks. It may be what you are looking for.

But why would executing same request yield different results?

Thank You for your response.

I need to check status of job till it gets completed(status changes from queued, scheduled, running and completed) and then only move further.

If you are still looking for how to do this, you can use asLongAs

.exec(http(“get Status”)

.asLongAs(session => session(“status”).as[String] != “completed”){
exec(http(“GET until status is completed”)