0

The services I'm trying to test will work on a long pooling method.

They won't give results in the first response.

When I run my API script I am not getting a full response in the first time.

How can I wait in this case for the remaining portion of the response to be received?

I want to use values from this response into the next call.

enter image description here

In the above screen, my response should wait when complete: True

0
  1. Add JSON Extractor as a child of the request which returns the above response and configure it like:

    enter image description here

  2. Put your request under the While Controller and use the following __jexl3() function as the condition:

    ${__jexl3("${complete}" != "true",)}
    

    enter image description here

  3. That's it, While Controller will continue executing its children until the condition is met:

    enter image description here

| improve this answer | |
  • Is there a timer guarding the while so it doesn't get stuck in an endless loop ? – Rsf Mar 11 at 8:55
  • Nope, but you can add an extra clause to your condition to i.e. make not more than 10 iterations of the While Controller – Dmitri T Mar 11 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.