You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by sebb <se...@gmail.com> on 2004/10/08 12:41:51 UTC

While Controller issues

On Wed, 6 Oct 2004 03:13:20 +0100, sebb <se...@gmail.com> wrote:
> 
> 
> On Tue, 5 Oct 2004 22:41:18 +0100, sebb <se...@gmail.com> wrote:
> > On Tue, 5 Oct 2004 17:56:45 +0200, Guillermo Sobrino
> > <gs...@altiria.com> wrote:
> > > Hello,
> > >
> > > I'm trying to test an aplication that would need a "while" control structure in his test using Jmeter, that's to say,
> > > I have to request the same page until the response matched a pattern (end of a long process). I've used a Forever Loop Controller
> > > and a Response Assertion combined with a Result Status Action Handler to stop the test, but now I need to continue
> > > testing more things without stop the test.
> > >
> > > Any suggestion?
> >
> > I don't think there's any way to do this at present - but I could be wrong.
> >
> > Seems like a useful enhancement though.
> >
> > I'm thinking that Assertions could be enhanced to save the status in a
> > variable, and this variable could be tested by a new While controller.
> >
> > I'll see if I can put something simple together in near future -
> > probably using a single fixed variable name , as that's easier to do,
> > and see how it goes from there...
> 
> I've committed a basic While controller to CVS.
> This has been included in the latest nightly build, if you want to
> give it a whirl - no guarantees.
> 
> No documentation yet, but the condition can be:
> 
> LAST (or empty) - was last sample successful?
> ALL - were all samples in scope successful?
> anything else - Javascript condition, exactly as per the If controller.

Found some problems with the implementation:
- ALL does not work as described above - it actually checks all the
_Assertions_ for the last sample. I intend to withdraw that facility.
- if the condition is Javascript returning false, the controller still
runs at least once.

I also intend to change the condition to check for the string "true"
(any case) rather than unconditionally assuming JavaScript. This is
more flexible, as it would allow the use of functions - including
__javaScript(), of course.

The controller should still work OK  where the intention is to exit
the loop if the last sample fails. If not, please let me know!

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


Re: While Controller issues

Posted by sebb <se...@gmail.com>.
Thanks.

Glad it works for you.


On Wed, 27 Oct 2004 19:41:15 +0200, Guillermo Sobrino
<gs...@altiria.com> wrote:
> Sorry for the delay, I've been out for a long time.
> 
> Thank you very much indeed for the while controller, it works fine for
> me because I only need it to stop a endless loop, so I don't care if the loop is
> run a last time after Javascript condition.
> 
>                    Guillermo
> 
> > -----Mensaje original-----
> > De: sebb [mailto:sebbaz@gmail.com]
> > Enviado el: viernes, 08 de octubre de 2004 12:42
> > Para: JMeter Users List
> > Asunto: While Controller issues
> 
> 
> >
> >
> > On Wed, 6 Oct 2004 03:13:20 +0100, sebb <se...@gmail.com> wrote:
> > >
> > >
> > > On Tue, 5 Oct 2004 22:41:18 +0100, sebb <se...@gmail.com> wrote:
> > > > On Tue, 5 Oct 2004 17:56:45 +0200, Guillermo Sobrino
> > > > <gs...@altiria.com> wrote:
> > > > > Hello,
> > > > >
> > > > > I'm trying to test an aplication that would need a
> > "while" control
> > > > > structure in his test using Jmeter, that's to say, I have to
> > > > > request the same page until the response matched a
> > pattern (end of
> > > > > a long process). I've used a Forever Loop Controller and a
> > > > > Response Assertion combined with a Result Status Action
> > Handler to
> > > > > stop the test, but now I need to continue testing more things
> > > > > without stop the test.
> > > > >
> > > > > Any suggestion?
> > > >
> > > > I don't think there's any way to do this at present - but
> > I could be
> > > > wrong.
> > > >
> > > > Seems like a useful enhancement though.
> > > >
> > > > I'm thinking that Assertions could be enhanced to save
> > the status in
> > > > a variable, and this variable could be tested by a new While
> > > > controller.
> > > >
> > > > I'll see if I can put something simple together in near future -
> > > > probably using a single fixed variable name , as that's easier to
> > > > do, and see how it goes from there...
> > >
> > > I've committed a basic While controller to CVS.
> > > This has been included in the latest nightly build, if you want to
> > > give it a whirl - no guarantees.
> > >
> > > No documentation yet, but the condition can be:
> > >
> > > LAST (or empty) - was last sample successful?
> > > ALL - were all samples in scope successful?
> > > anything else - Javascript condition, exactly as per the If
> > > controller.
> >
> > Found some problems with the implementation:
> > - ALL does not work as described above - it actually checks
> > all the _Assertions_ for the last sample. I intend to
> > withdraw that facility.
> > - if the condition is Javascript returning false, the
> > controller still runs at least once.
> >
> > I also intend to change the condition to check for the string
> > "true" (any case) rather than unconditionally assuming
> > JavaScript. This is more flexible, as it would allow the use
> > of functions - including __javaScript(), of course.
> >
> > The controller should still work OK  where the intention is
> > to exit the loop if the last sample fails. If not, please let me know!
> > 
> > ---------------------------------------------------------------------
> > 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 issues

Posted by Guillermo Sobrino <gs...@altiria.com>.
Sorry for the delay, I've been out for a long time.

Thank you very much indeed for the while controller, it works fine for 
me because I only need it to stop a endless loop, so I don't care if the loop is
run a last time after Javascript condition.

                   Guillermo



> -----Mensaje original-----
> De: sebb [mailto:sebbaz@gmail.com] 
> Enviado el: viernes, 08 de octubre de 2004 12:42
> Para: JMeter Users List
> Asunto: While Controller issues
> 
> 
> On Wed, 6 Oct 2004 03:13:20 +0100, sebb <se...@gmail.com> wrote:
> > 
> > 
> > On Tue, 5 Oct 2004 22:41:18 +0100, sebb <se...@gmail.com> wrote:
> > > On Tue, 5 Oct 2004 17:56:45 +0200, Guillermo Sobrino 
> > > <gs...@altiria.com> wrote:
> > > > Hello,
> > > >
> > > > I'm trying to test an aplication that would need a 
> "while" control 
> > > > structure in his test using Jmeter, that's to say, I have to 
> > > > request the same page until the response matched a 
> pattern (end of 
> > > > a long process). I've used a Forever Loop Controller and a 
> > > > Response Assertion combined with a Result Status Action 
> Handler to 
> > > > stop the test, but now I need to continue testing more things 
> > > > without stop the test.
> > > >
> > > > Any suggestion?
> > >
> > > I don't think there's any way to do this at present - but 
> I could be 
> > > wrong.
> > >
> > > Seems like a useful enhancement though.
> > >
> > > I'm thinking that Assertions could be enhanced to save 
> the status in 
> > > a variable, and this variable could be tested by a new While 
> > > controller.
> > >
> > > I'll see if I can put something simple together in near future - 
> > > probably using a single fixed variable name , as that's easier to 
> > > do, and see how it goes from there...
> > 
> > I've committed a basic While controller to CVS.
> > This has been included in the latest nightly build, if you want to 
> > give it a whirl - no guarantees.
> > 
> > No documentation yet, but the condition can be:
> > 
> > LAST (or empty) - was last sample successful?
> > ALL - were all samples in scope successful?
> > anything else - Javascript condition, exactly as per the If 
> > controller.
> 
> Found some problems with the implementation:
> - ALL does not work as described above - it actually checks 
> all the _Assertions_ for the last sample. I intend to 
> withdraw that facility.
> - if the condition is Javascript returning false, the 
> controller still runs at least once.
> 
> I also intend to change the condition to check for the string 
> "true" (any case) rather than unconditionally assuming 
> JavaScript. This is more flexible, as it would allow the use 
> of functions - including __javaScript(), of course.
> 
> The controller should still work OK  where the intention is 
> to exit the loop if the last sample fails. If not, please let me know!
> 
> ---------------------------------------------------------------------
> 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