jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From UBIK LOAD PACK Support <>
Subject Re: how to wait on a HTTP request while waiting for response content to change
Date Fri, 29 Jan 2016 10:09:20 GMT
On Fri, Jan 29, 2016 at 11:03 AM, Charles Lin (charlin) <>

> Hi experts,
> I have an HTTP request which is submitted to server, and I need to wait on
> this request for the response content to contain some critical value that I
> need to extract and use in subsequent HTTP requests.
> For example, when the HTTP request is submitted, initially I might get
> something like
> window.parent.func_prepare('Preparing',' ....
> But after server completes processing of the request and data has become
> available, then the Response content (to the above same HTTP request) will
> contain something like this:
> window.parent.func_prepare('OKOK',' ....
> So I have a RegEx Extractor trying to extract some string that is part of
> the 'good' response, which is the one with ('OKOK', .... Plus critical
> value I want to extract)
> But depending on the processing delay on the server backend, this request
> will fail to obtain the desired RegEx extraction, because it cannot find
> any RegEx match in the 'bad' response, which is the one with
> ('Preparing','...... stuff that does not contain the data I need)
> I have set up HTTP request as follows:
>                 HTTP Sampler
>                                 ->Constant Timer
>                                 ->RegEx Extractor (for variable1)
>                                 ->Assertion (for existence of 'OKOK' and
> other strings based on RegEx match)
>                                 ->RegEx Extractor (for variable2)
> First of all, I don't think the Constant Timer is working, since I can
> tell that execution just move on even if I set a large timer value.

No that's not how Timer and Post Processor will work:

> But also, instead of simple (dumb) timer, perhaps I should use some more
> advance logic, like if response contains 'Preparing', then wait for
> response to change, until I see 'OKOK' in response, or after some timeout
> is reached.

> But I am not sure how to construction that logic around this HTTP Sampler.
This answer contains what you need:

> Any help is greatly appreciated.
> Regards,
> Charles


Ubik Load Pack <> Team
Follow us on Twitter <>

L'équipe Ubik Load Pack <>
Suivez-nous sur Twitter <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message