You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Ja...@playstation.sony.com on 2012/03/21 20:44:45 UTC

is there a way to tell if the jmeter test is finished and run a beanshell script on this event?

I need to close an open file when the test is done.  I've tried using a 
counter, but the beanshell post processor never seems to get run at the 
right time.

Thanks,

Jake Devore
SCE WWS OTG Operations Engineering
(253) 981-4252

Re: is there a way to tell if the jmeter test is finished and run a beanshell script on this event?

Posted by Ja...@playstation.sony.com.
I have a post process outside the thread group, but it seems to run with 
each sample.

test
-global vars
-beanshell preprocessor opens file in bsh.shared and counter in 
bsh.shared(runs with each sample)
-thread
-----beanshell preprocessor that calculates path in http request and 
writes to file(runs only if var in global vars is 1)
-----beanshell preprocessor that read path from file and sets http request 
path(runs only if var in global vars is 0)
-----http request
-beanshell postprocessor closes file in bsh.shared if counter in 
bsh.shared is equal to thread_count * loop_count - 1(runs with each 
sample)

Thanks,

Jake Devore
SCE WWS OTG Operations Engineering
(253) 981-4252



karl <ka...@sitestress.eu> 
03/21/2012 01:17 PM
Please respond to
"JMeter Users List" <us...@jmeter.apache.org>


To
user@jmeter.apache.org
cc

Subject
Re: is there a way to tell if the jmeter test is finished and run a 
beanshell script on this event?






Hi Jake,

whats about this:
the last sampler could be a beanshell-sampler or in the last sampler a 
post-process beanshell

regards
karl

  Am 21.03.2012 20:44, schrieb Jake_Devore@playstation.sony.com:
> I need to close an open file when the test is done.  I've tried using a
> counter, but the beanshell post processor never seems to get run at the
> right time.
>
> Thanks,
>
> Jake Devore
> SCE WWS OTG Operations Engineering
> (253) 981-4252


-- 
*Karl Hoffmann*
QA L&P
SITESTRESS.EU.: http://www.sitestress.eu/
Email: karl< @ >sitestress.eu Mobile: +495251687060

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



Re: is there a way to tell if the jmeter test is finished and run a beanshell script on this event?

Posted by karl <ka...@sitestress.eu>.
Hi Jake,

whats about this:
the last sampler could be a beanshell-sampler or in the last sampler a 
post-process beanshell

regards
karl

  Am 21.03.2012 20:44, schrieb Jake_Devore@playstation.sony.com:
> I need to close an open file when the test is done.  I've tried using a
> counter, but the beanshell post processor never seems to get run at the
> right time.
>
> Thanks,
>
> Jake Devore
> SCE WWS OTG Operations Engineering
> (253) 981-4252


-- 
*Karl Hoffmann*
QA L&P
SITESTRESS.EU.: http://www.sitestress.eu/
Email: karl< @ >sitestress.eu Mobile: +495251687060

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


Re: is there a way to tell if the jmeter test is finished and run a beanshell script on this event?

Posted by Ja...@playstation.sony.com.
I went a completely different direction.  So now I gen the files in bash, 
and send that in whether I want cached or non cached files.  It will work 
for my purposes.  Thank you for the help.

Jake Devore
SCE WWS OTG Operations Engineering
(253) 981-4252



sebb <se...@gmail.com> 
03/21/2012 04:24 PM
Please respond to
"JMeter Users List" <us...@jmeter.apache.org>


To
JMeter Users List <us...@jmeter.apache.org>
cc

Subject
Re: is there a way to tell if the jmeter test is finished and run a 
beanshell script on this event?






On 21 March 2012 19:44,  <Ja...@playstation.sony.com> wrote:
> I need to close an open file when the test is done.

What opens the file? Is it some add-on code you wrote?
If so, use testEnded() to close it.

> I've tried using a
> counter, but the beanshell post processor never seems to get run at the
> right time.

Listeners are run last of all.

> Thanks,
>
> Jake Devore
> SCE WWS OTG Operations Engineering
> (253) 981-4252

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



Re: is there a way to tell if the jmeter test is finished and run a beanshell script on this event?

Posted by sebb <se...@gmail.com>.
On 21 March 2012 19:44,  <Ja...@playstation.sony.com> wrote:
> I need to close an open file when the test is done.

What opens the file? Is it some add-on code you wrote?
If so, use testEnded() to close it.

> I've tried using a
> counter, but the beanshell post processor never seems to get run at the
> right time.

Listeners are run last of all.

> Thanks,
>
> Jake Devore
> SCE WWS OTG Operations Engineering
> (253) 981-4252

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