On 23/10/2007, Ori Marco <[EMAIL PROTECTED]> wrote:
> Hi
>
> Sorry for this ping pong , but I meant checking it after the sampler
> (after few samplers)
>
> Example:
> Thread
> -Sampler1
> -Sampler2
> ...
> -Sampler5
> ...
> -Sampler10
> -If Sampler5 failed-> Stop
> -Sampler11
> ...

I see - I did not expect that as one of the possibilities.

The obvious answer is to use a variable save the status of sampler 5
after it executes - or before sampler 6 executes - and then check the
variable after sampler 10.

You might be able to use

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

to set the variable; you can then check it in:

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

with a TestAction sampler to stop the thread.


> Ori Marko
> Quality Assurance Engineer
> Praxell Inc.
> http://www.praxell.com
>
> -----Original Message-----
> From: sebb [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 23, 2007 3:48 PM
> To: JMeter Users List
> Subject: Re: How can I know if samplers failed in runtime
>
> On 23/10/2007, Ori Marco <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > For the first case, I didn't find in JMeterThread class option to know
> > which
> > Sample failed or not.
>
> What has the JMeterThread class got to do with this?
>
> > Can you give example to check (in beanshell script) if sampler no. 5
> or
> > sampler named sampler5
> > Succeeded or failed?
>
> You don't need BeanShell for that; use the Result Status Action Handler.
>
> > Thanks
> >
> > Ori Marko
> > Quality Assurance Engineer
> > Praxell Inc.
> > http://www.praxell.com
> >
> > -----Original Message-----
> > From: sebb [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, October 23, 2007 3:17 PM
> > To: JMeter Users List
> > Subject: Re: How can I know if samplers failed in runtime
> >
> > Do you mean you want to stop the test:
> > * if 5 or 6 samples out of 10 failed in a single thread
> > * if 5 or 6 samples out of 10 failed in any thread
> > * if sampler 5 or sampler 6 failed in any thread
> >
> > The last case is easy, just add a
> >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Res
> > ult_Status_Action_Handler
> >
> > The other cases cannot be handled in JMeter directly, though one could
> > write a BeanShell Post-Processor or Listener to count the failures.
> >
> > I suppose the Result Status Action Handler could be extended to handle
> > the other cases.
> >
> > On 23/10/2007, Ori Marco <[EMAIL PROTECTED]> wrote:
> > > I need to run several samplers, assuming 10 and then if samplers for
> > > example 5 or 6 failed
> > > To stop test/thread.
> > >
> > > Ori Marko
> > > Quality Assurance Engineer
> > > Praxell Inc.
> > > http://www.praxell.com
> > >
> > > -----Original Message-----
> > > From: sebb [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, October 23, 2007 2:05 PM
> > > To: JMeter Users List
> > > Subject: Re: How can I know if samplers failed in runtime
> > >
> > > The success/failure of a sample can clearly be seen in most of the
> > > Listeners.
> > >
> > > And by default the status is saved to JTL files. (e.g. s="true" in
> XML
> > > output)
> > >
> > > What are you trying to do with the status?
> > >
> > > On 23/10/2007, Ori Marco <[EMAIL PROTECTED]> wrote:
> > > > Hi
> > > >
> > > >
> > > >
> > > > I want to check if and which previous samplers where successful or
> > > not.
> > > >
> > > > It seems like JMeterThread.last_sample_ok is the solution, but if
> I
> > > need
> > > > to check not only for last sample?
> > > >
> > > > Is the only way if to add variables assigned with last_sample_ok
> of
> > > each
> > > > sample?
> > > >
> > > >
> > > >
> > > > Thanks
> > > >
> > > >
> > > >
> > > > Ori Marko
> > > > Quality Assurance Engineer
> > > > Praxell Inc.
> > > > http://www.praxell.com <http://www.praxell.com>
> > > >
> > > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to