On 21/05/2009, Noel O'Brien <[email protected]> wrote: > Hi All, > > Is it possible to define a beanshell function that I can use throughout my > test in the same way as the built in functions, e.g. instead of using > ${__threadNum()} > I can use ${__encrypt("raw string")} ?
You can define a Beanhell function in an init file such as BeanShellFunction.bshrc, but this will need to be invoked using __BeanShell(functionName()) It's not possible to register the BeanShell function as a "native" function. However, you can of course create your own function, just make sure it implements org.apache.jmeter.functions.Function The package name must contain ".functions." but not ".gui." - see jmeter.properties "classfinder.functions" for details. The code would need to be put in a jar and stored in lib/ext. > -- > Regards, > > Noel > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

