You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Bernhard Wellhöfer <Be...@gaia-group.com> on 2007/02/28 10:18:35 UTC

While-Controller question

Hello,
 
I have one question regarding while controllers:
 
What I need is a while controller which has one HTTP request sampler as only child. E.g. a post processor to the HTTP request checks whether the response body contains a specific text. If yes the while controller should stop and if not the while controller should continue to call the HTTP request sampler. Here the simple test tree:
 
While Controller (loop until Post Processor detects a specific text in the response)
    HTTP Request Sampler
        Post Processor
 
I read the whole JMeter documentation, but have no idea how to implement this feature in JMeter. 
 
Thx in advance,
 
Bernhard

AW: While-Controller question

Posted by Bernhard Wellhöfer <Be...@gaia-group.com>.
Thx! 

> -----Ursprüngliche Nachricht-----
> Von: sebb [mailto:sebbaz@gmail.com] 
> Gesendet: Mittwoch, 28. Februar 2007 12:06
> An: JMeter Users List
> Betreff: Re: While-Controller question
> 
> http://jakarta.apache.org/jmeter/usermanual/component_referenc
> e.html#While_Controller
> 
> Either:
> 
> use LAST and add an assertion to set the sampler as failed
> 
> Or:
> 
> use ${VARIABLE} and have the P-P set VARIABLE=FALSE when you are done.
> 
> 
> 
> On 28/02/07, Bernhard Wellhöfer 
> <Be...@gaia-group.com> wrote:
> > Hello,
> >
> > I have one question regarding while controllers:
> >
> > What I need is a while controller which has one HTTP 
> request sampler as only child. E.g. a post processor to the 
> HTTP request checks whether the response body contains a 
> specific text. If yes the while controller should stop and if 
> not the while controller should continue to call the HTTP 
> request sampler. Here the simple test tree:
> >
> > While Controller (loop until Post Processor detects a 
> specific text in the response)
> >    HTTP Request Sampler
> >        Post Processor
> >
> > I read the whole JMeter documentation, but have no idea how 
> to implement this feature in JMeter.
> >
> > Thx in advance,
> >
> > Bernhard
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: While-Controller question

Posted by sebb <se...@gmail.com>.
Please read:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#While_Controller

On 09/05/07, CharekC <ch...@gmail.com> wrote:
>
> I have a similar situation to the original poster but I want to assign my
> while loop a maximum number of iterations.
> I've created a counter preprocessor inside the while loop as well as a
> response assertion after the http sampler.
>
> My while condition currently is ${JMeterThread.last_sample_ok} but I want
> something like
>  ${JMeterThread.last_sample_ok}  &&  ${count} < 10
> But that doesn't seem to work
>
> Do I have to use beanshell or javascript for this kind of expression?
>
>
> sebb-2 wrote:
> >
> > http://jakarta.apache.org/jmeter/usermanual/component_reference.html#While_Controller
> >
> > Either:
> >
> > use LAST and add an assertion to set the sampler as failed
> >
> > Or:
> >
> > use ${VARIABLE} and have the P-P set VARIABLE=FALSE when you are done.
> >
> >
> >
> > On 28/02/07, Bernhard Wellhöfer <Be...@gaia-group.com>
> > wrote:
> >> Hello,
> >>
> >> I have one question regarding while controllers:
> >>
> >> What I need is a while controller which has one HTTP request sampler as
> >> only child. E.g. a post processor to the HTTP request checks whether the
> >> response body contains a specific text. If yes the while controller
> >> should stop and if not the while controller should continue to call the
> >> HTTP request sampler. Here the simple test tree:
> >>
> >> While Controller (loop until Post Processor detects a specific text in
> >> the response)
> >>    HTTP Request Sampler
> >>        Post Processor
> >>
> >> I read the whole JMeter documentation, but have no idea how to implement
> >> this feature in JMeter.
> >>
> >> Thx in advance,
> >>
> >> Bernhard
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/While-Controller-question-tf3307648.html#a10394987
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: While-Controller question

Posted by CharekC <ch...@gmail.com>.
I have a similar situation to the original poster but I want to assign my
while loop a maximum number of iterations.
I've created a counter preprocessor inside the while loop as well as a
response assertion after the http sampler.

My while condition currently is ${JMeterThread.last_sample_ok} but I want
something like
 ${JMeterThread.last_sample_ok}  &&  ${count} < 10
But that doesn't seem to work

Do I have to use beanshell or javascript for this kind of expression?


sebb-2 wrote:
> 
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#While_Controller
> 
> Either:
> 
> use LAST and add an assertion to set the sampler as failed
> 
> Or:
> 
> use ${VARIABLE} and have the P-P set VARIABLE=FALSE when you are done.
> 
> 
> 
> On 28/02/07, Bernhard Wellhöfer <Be...@gaia-group.com>
> wrote:
>> Hello,
>>
>> I have one question regarding while controllers:
>>
>> What I need is a while controller which has one HTTP request sampler as
>> only child. E.g. a post processor to the HTTP request checks whether the
>> response body contains a specific text. If yes the while controller
>> should stop and if not the while controller should continue to call the
>> HTTP request sampler. Here the simple test tree:
>>
>> While Controller (loop until Post Processor detects a specific text in
>> the response)
>>    HTTP Request Sampler
>>        Post Processor
>>
>> I read the whole JMeter documentation, but have no idea how to implement
>> this feature in JMeter.
>>
>> Thx in advance,
>>
>> Bernhard
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/While-Controller-question-tf3307648.html#a10394987
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: While-Controller question

Posted by sebb <se...@gmail.com>.
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#While_Controller

Either:

use LAST and add an assertion to set the sampler as failed

Or:

use ${VARIABLE} and have the P-P set VARIABLE=FALSE when you are done.



On 28/02/07, Bernhard Wellhöfer <Be...@gaia-group.com> wrote:
> Hello,
>
> I have one question regarding while controllers:
>
> What I need is a while controller which has one HTTP request sampler as only child. E.g. a post processor to the HTTP request checks whether the response body contains a specific text. If yes the while controller should stop and if not the while controller should continue to call the HTTP request sampler. Here the simple test tree:
>
> While Controller (loop until Post Processor detects a specific text in the response)
>    HTTP Request Sampler
>        Post Processor
>
> I read the whole JMeter documentation, but have no idea how to implement this feature in JMeter.
>
> Thx in advance,
>
> Bernhard
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: While-Controller question

Posted by sebb <se...@gmail.com>.
On 28/02/07, Nino Wael <Ni...@sdk.sas.com> wrote:
> Yes, this seems to be a bit weakly described...

Bugs/patches welcome.

> I have also read the documentation, and it seems as you can use some javascript to manipulate variables with in jmeter. Your while controller should check a variabled, and then the post processor should set the variable to true or false depending on the outcome of the http request sampler.
>
> I think you can run a beanshell post processor to manipulate the variable?
>
> -----Original Message-----
> From: Bernhard Wellhöfer [mailto:Bernhard.Wellhoefer@gaia-group.com]
> Sent: 28. februar 2007 10:19
> To: jmeter-user@jakarta.apache.org
> Subject: While-Controller question
>
> Hello,
>
> I have one question regarding while controllers:
>
> What I need is a while controller which has one HTTP request sampler as only child. E.g. a post processor to the HTTP request checks whether the response body contains a specific text. If yes the while controller should stop and if not the while controller should continue to call the HTTP request sampler. Here the simple test tree:
>
> While Controller (loop until Post Processor detects a specific text in the response)
>    HTTP Request Sampler
>        Post Processor
>
> I read the whole JMeter documentation, but have no idea how to implement this feature in JMeter.
>
> Thx in advance,
>
> Bernhard
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: While-Controller question

Posted by Nino Wael <Ni...@sdk.sas.com>.
Yes, this seems to be a bit weakly described...

I have also read the documentation, and it seems as you can use some javascript to manipulate variables with in jmeter. Your while controller should check a variabled, and then the post processor should set the variable to true or false depending on the outcome of the http request sampler. 

I think you can run a beanshell post processor to manipulate the variable? 

-----Original Message-----
From: Bernhard Wellhöfer [mailto:Bernhard.Wellhoefer@gaia-group.com] 
Sent: 28. februar 2007 10:19
To: jmeter-user@jakarta.apache.org
Subject: While-Controller question

Hello,
 
I have one question regarding while controllers:
 
What I need is a while controller which has one HTTP request sampler as only child. E.g. a post processor to the HTTP request checks whether the response body contains a specific text. If yes the while controller should stop and if not the while controller should continue to call the HTTP request sampler. Here the simple test tree:
 
While Controller (loop until Post Processor detects a specific text in the response)
    HTTP Request Sampler
        Post Processor
 
I read the whole JMeter documentation, but have no idea how to implement this feature in JMeter. 
 
Thx in advance,
 
Bernhard

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org