On 29/09/2008, Laurent Perez <[EMAIL PROTECTED]> wrote: > >> I'm using a beanshell postprocessor like : > > <snip> > > > By the time the beanshell post-processor is invoked, the test has > > already started. > > > Sorry, I meant, I'm using a beanshell PREprocessor (very wrong typo) >
Same applies to the Pre-Processor. No test elements are processed until the test starts. > But it sounds like the preprocessor is invoked once the test has > started, too ; I've made a very simple jmx scenario, and bsh variables > are not seen. > > Is it the expected behaviour, does a preprocessor only precedes once > the thread group has started ? PreProcessors are processed before any Samples in scope - not before the test. > My use case is that I'd like to be able to compute thread group > duration/startup delay variables in a single place (i.e a bsh script) > before starting the groups : I have many groups (~20 of them, to mimic > various scenarios), and expressing things like "group1 will start and > live for 30 minutes, group2 will start 15 minutes after group1 has > started and live for 5 minutes, and so on" is very tedious when I have > to setup each and every group timers independently. > I don't have the code to hand, but I'm fairly sure you can use the beanshell initialisation script for this. Just define the property beanshell.init.file in jmeter.properties. If you include a print() statement you can check whether the script is processed before the test is started. Or use a scripting language to create the appropriate entries in a properties file and pass that to JMeter. > Thanks > laurent > > -- > <a href="http://in-pocket.blogspot.com">http://in-pocket.blogspot.com > - Mobile world, technology and more</a> > > --------------------------------------------------------------------- > 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]

