Bob - i think you can apply Assertion same as with Config element, meaning that assertion can be put at the most common root to the other samplers and it will be applied to them all.
www.beatsoo.org - free application performance monitoring from world wide locations. On Apr 6, 2015 8:18 AM, "Bob" <[email protected]> wrote: > Thanks Chaitanya! > > "Parameterized Controller" won't work as I'm using Beanshell assertion. > > If you have a lot of methods in your beanshell I would recommend you to >> convert it into a java archive(jar) and use it as lib extension. >> > > This option will work but I don't know if it's worse just for 3 methods. > > Maybe it's possible to define in jmeter.properties? > > > > On 05/04/15 13:27, chaitanya bhatt wrote: > >> Check out the plugin called "Parameterized Controller". >> Link : http://jmeter-plugins.org/wiki/ParameterizedController/ >> >> If you use this plugin in conjunction with Module controller you can >> achieve your goal. Your beanshell should probably scope each method in a >> switch statement case. The caller of this beanshell should pass the >> intended method name as one of the parameters. The only pain point with >> this approach is to exchange several parameters in the form of >> vars.get/vars.getObject and vars.put/vars.putObject in your beanshell. >> >> If you have a lot of methods in your beanshell I would recommend you to >> convert it into a java archive(jar) and use it as lib extension. >> >> Thanks >> Chaitanya M Bhatt >> http://www.performancecompetence.com >> >> >> On Sat, Apr 4, 2015 at 8:49 PM, Bob <[email protected]> wrote: >> >> Hi, >>> >>> Is it possible to include once Beanshell script and re-use it in child >>> samplers, something like "HTTP Request Defaults"? Now I have to duplicate >>> this code each time when I want to use it's methods: >>> >>> source("${script.dir}/${include.dir}/${include.assertions}"); >>> >>> What I want is just include source("${script.dir}/${ >>> include.dir}/${include.assertions}"); once and re-use it anywhere I >>> want. >>> Thanks! >>> >>> --------------------------------------------------------------------- >>> 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] > >
