sebb wrote:
On 6/2/05, Seth Ladd <[EMAIL PROTECTED]> wrote:
Hello,
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.
Perfect!
Thanks very much,
Seth
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]