You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Charles Lin (charlin)" <ch...@cisco.com> on 2016/02/03 08:21:20 UTC

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