jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Mouawad <philippe.moua...@gmail.com>
Subject Re: problem exiting WHILE loop
Date Wed, 03 Feb 2016 21:15:31 GMT
Thanks for sharing

On Wed, Feb 3, 2016 at 8:40 AM, Charles Lin (charlin) <charlin@cisco.com>
wrote:

> Hi folks,
>
> Nevermind, I figured out the correct syntax
>
> ${__javaScript("${prep}"!="OKOK")}
>
> This worked.
>
> Thank you
>
> Charles
>
> From: Charles Lin (charlin)
> Sent: Tuesday, February 02, 2016 11:21 PM
> To: user@jmeter.apache.org
> Subject: problem exiting WHILE loop
>
> Hi,
>
> I have following setup:
>
>
> Define variable 'prep', set to initial value 'Preparing'
>
>
> While Loop (condition checks if 'prep' != 'OKOK')
>                 Counter, variable = loop, increment by 1
>                 Debug showing Loop ${loop} status = ${prep}
>                 Submit HTTP Request      = = > response contains either
> 'Preparing' which = not ready, or 'OKOK' which means file has been prepared
> and is ready for downloading
>                 RegEx extract, Reference Name = prep, expression search
> for (Preparing), Default Value = 'OKOK'
>                 Timer wait 2 sec
>
>
> View Result shows that I have correct values of prep (either 'Preparing'
> or 'OKOK'), but the conditional check of WHILE loop does not appear to take
> place, so test does not exist out of the WHILE loop (and HTTP request
> continue to be resubmitted) when it should exist.
>
>
> View Result Tree output looks like this:
>
> D: Before Wait Loop
> D: Loop # 1 status = Preparing
> http request
> D: Loop # 2 status = OKOK
> http request
> D: Loop # 3 status = OKOK
> http request
> D: Loop # 4 status = OKOK
> ......
> ...... repeating of above pattern
>
>
> Can you please advise what is the proper syntax to use to accomplish the
> goal of evaluating ${prep} != 'OKOK'  to FALSE so that it can exist the
> loop?
>
> Thanks
> Charles
>



-- 
Cordialement.
Philippe Mouawad.

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