You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Lorenzo Fundaró <lo...@gmail.com> on 2014/11/18 12:23:04 UTC
possible issue with While Controller
Hello,
I think I discovered what it might possibly be an issue in JMeter 2.11
r1554548
So here's the story:
I have a BeanShell PreProcessor that puts a variable like this:
vars.put("DONE_UPLOAD","false");
then,
I have a While controller that evaluates this variable like this:
${__javaScript("${DONE_UPLOAD}" == "false")}
then inside the While controller I have an HTTP Request sampler that
responds to either 200 or 202.
After the sampler (still inside the WhileController) I have a Beanshell
PostProcessor that does this:
if (prev.getResponseCode().equals("200")) {
vars.put("DONE_UPLOAD","200");
}
So the the set of instructions above could be described as "Do the HTTP
request until the response code changes to 200"
This flow does not work as expected, even thought I believe there are no
syntax errors.
However, it DOES work whenever I added a "Debug Sampler before the While
Controller".
Why is this ? it seems like the While controller is not properly evaluating
the variable on each iteration but the Debug Sampler does it for him.
Note that the Debug Sampler must also be outside of the While Controller.
I could send you guys a little Jmeter test plan with an example proving
this strange behaviour.
Thank you.
Lorenzo Fundaró García
Re: possible issue with While Controller
Posted by UBIK LOAD PACK Support <su...@ubikloadpack.com>.
Hi,
Can you check you are using last version 2.12.
You may be facing a fixed bug 56160
Regards
@ubikloadpack
On Tue, Nov 18, 2014 at 12:23 PM, Lorenzo Fundaró <lo...@gmail.com>
wrote:
> Hello,
>
> I think I discovered what it might possibly be an issue in JMeter 2.11
> r1554548
>
> So here's the story:
>
> I have a BeanShell PreProcessor that puts a variable like this:
> vars.put("DONE_UPLOAD","false");
> then,
> I have a While controller that evaluates this variable like this:
> ${__javaScript("${DONE_UPLOAD}" == "false")}
> then inside the While controller I have an HTTP Request sampler that
> responds to either 200 or 202.
> After the sampler (still inside the WhileController) I have a Beanshell
> PostProcessor that does this:
> if (prev.getResponseCode().equals("200")) {
> vars.put("DONE_UPLOAD","200");
> }
> So the the set of instructions above could be described as "Do the HTTP
> request until the response code changes to 200"
>
> This flow does not work as expected, even thought I believe there are no
> syntax errors.
> However, it DOES work whenever I added a "Debug Sampler before the While
> Controller".
>
> Why is this ? it seems like the While controller is not properly evaluating
> the variable on each iteration but the Debug Sampler does it for him.
>
> Note that the Debug Sampler must also be outside of the While Controller.
> I could send you guys a little Jmeter test plan with an example proving
> this strange behaviour.
>
> Thank you.
>
> Lorenzo Fundaró García
>
--
Regards
Ubik Load Pack <http://ubikloadpack.com> Team
Follow us on Twitter <http://twitter.com/ubikloadpack>
Cordialement
L'équipe Ubik Load Pack <http://ubikloadpack.com>
Suivez-nous sur Twitter <http://twitter.com/ubikloadpack>