Search code examples
jmeterjmeter-pluginsjmeter-5.0jmeter-3.2

Is there anyway to hold response until we get full response from server in Jmeter?


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

They won't give results in first response.

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

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

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

enter image description here In the above screen my response should wait when complete:True


Solution

  • As far as I understand your requirement you need to repeat the Gethotels request until complete attribute becomes true.

    In order to accomplish this:

    1. Add a JSON Extractor as a child of the Gethotels request and set it up as follows:

      enter image description here

    2. Put your Gethotels 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 loop the Gethotels request until complete becomes true

      enter image description here