jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Seth Ladd <>
Subject Re: A place for global init function?
Date Thu, 02 Jun 2005 18:45:02 GMT
sebb wrote:
> On 6/2/05, Seth Ladd <> wrote:
>>I'm looking into using the BeanShell Sampler to write performance tests
>>for high level service facades.  Is there a place to init some code only
>>once, at the beginning of the test run?  For instance, I'd like to start
>>a Spring ApplicationContext before the test begins, so that all my
>>BeanShell Samplers have access to this ApplicationContext.
> From the manual:
> "If the property "beanshell.sampler.init" is defined, it is passed to
> the Interpreter as the name of a sourced file. This can be used to
> define common methods and variables. There is a sample init file in
> the bin directory: BeanShellFunction.bshrc."
> This file is processed when the sampler is created, so will be invoked
> at most once per thread per test. I'm not sure if variables are shared
> between all threads, but it should be easy enough to find out.

Ah, thanks.  I wasn't sure if the file was processed, or just available 
to share common functions.  I guess since it's interpretted, it would 
have to be processed.


Thanks very much,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message