You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Johanna Briseno <br...@gmail.com> on 2007/08/13 16:05:52 UTC

How to kill a thread

Hi,

Exists a method to kill a thread before the test is executed completely?


Thanks,


Jo

Re: How to kill a thread

Posted by sebb <se...@gmail.com>.
Whichever is more appropriate. You could even use a BeanShell Listener
if that was better suited to the task.

Note that there are other ways of stopping a thread, e.g.

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

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

S
On 13/08/07, Johanna Briseno <br...@gmail.com> wrote:
> inside a beanshell processor you can use something like
>
> Which Beanshell?
>
> Beanshell PreProcessor or
> Beanshell PostProcessor
>
>
> Thanks.
>
>
>
>
> 2007/8/13, André Pfeiler <pf...@e-spirit.de>:
> >
> > On Monday 13 August 2007 16:05, Johanna Briseno wrote:
> > > Hi,
> > >
> > > Exists a method to kill a thread before the test is executed completely?
> >
> > inside a beanshell processor you can use something like
> >
> > org.apache.jmeter.engine.StandardJMeterEngine.stopThread(
> > Thread.currentThread().getName());
> >
> > SampleResult.setStopThread(true);
> >
> > >
> > >
> > > Thanks,
> > >
> > >
> > > Jo
> >
> > --
> > André Pfeiler
> >
> > The e-Spirit Company GmbH
> > Barcelonaweg 14
> > D-44269 Dortmund
> > http://www.FIRSTspirit.de
> >
> > fax: +49 231 28661-59
> > e-mail: pfeiler@e-Spirit.de
> >
> > Geschäftsführer:
> > Jörn Bodemann, Michael Kenfenheuer
> > Amtsgericht Dortmund (HRB 13961)
> >
> > ---------------------------------------------------------------------
> > 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: How to kill a thread

Posted by Johanna Briseno <br...@gmail.com>.
inside a beanshell processor you can use something like

Which Beanshell?

Beanshell PreProcessor or
Beanshell PostProcessor


Thanks.




2007/8/13, André Pfeiler <pf...@e-spirit.de>:
>
> On Monday 13 August 2007 16:05, Johanna Briseno wrote:
> > Hi,
> >
> > Exists a method to kill a thread before the test is executed completely?
>
> inside a beanshell processor you can use something like
>
> org.apache.jmeter.engine.StandardJMeterEngine.stopThread(
> Thread.currentThread().getName());
>
> SampleResult.setStopThread(true);
>
> >
> >
> > Thanks,
> >
> >
> > Jo
>
> --
> André Pfeiler
>
> The e-Spirit Company GmbH
> Barcelonaweg 14
> D-44269 Dortmund
> http://www.FIRSTspirit.de
>
> fax: +49 231 28661-59
> e-mail: pfeiler@e-Spirit.de
>
> Geschäftsführer:
> Jörn Bodemann, Michael Kenfenheuer
> Amtsgericht Dortmund (HRB 13961)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: How to kill a thread

Posted by André Pfeiler <pf...@e-spirit.de>.
On Monday 13 August 2007 16:05, Johanna Briseno wrote:
> Hi,
>
> Exists a method to kill a thread before the test is executed completely?

inside a beanshell processor you can use something like

org.apache.jmeter.engine.StandardJMeterEngine.stopThread(		
Thread.currentThread().getName());

SampleResult.setStopThread(true);

>
>
> Thanks,
>
>
> Jo

-- 
André Pfeiler 

The e-Spirit Company GmbH
Barcelonaweg 14
D-44269 Dortmund
http://www.FIRSTspirit.de 

fax: +49 231 28661-59
e-mail: pfeiler@e-Spirit.de 

Geschäftsführer: 
Jörn Bodemann, Michael Kenfenheuer
Amtsgericht Dortmund (HRB 13961)

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