DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
BeanShell Sampler (Beta Code)
This sampler allows you to write a sampler using the \[http://www.beanshell.org/ BeanShell\] scripting language.unmigrated-wiki-markupWiki Markup
Please note that the \[http://www.beanshell.org/ BeanShell\] jar file is not included with JMeter; it needs to be separately downloaded. For full details on using \[http://www.beanshell.org/ BeanShell\] please see the \[http://www.beanshell.org/ BeanShell web-site\].
Parameters
Attribute | Description | Required | ||
Name | Descriptive name for this controller that is shown in the tree. | No | ||
Parameters | List of parameters to be passed to the script file or the script. | No <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="cac5c861-f0e3-4fb7-82b7-07452fbc8b02"><ac:plain-text-body><![CDATA[ | ||
Script File | Name of a file to be used as a [http://www.beanshell.org/ BeanShell] script | Yes, unless Script filled in | ]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1ced79b1-f139-4ddf-88fe-8c04c821fd3b"><ac:plain-text-body><![CDATA[ |
Script | Script to be passed to [http://www.beanshell.org/ BeanShell] | Yes, unless Script File filled in | ]]></ac:plain-text-body></ac:structured-macro> |
N.B. Each Sampler instance has its own \[http://www.beanshell.org/ BeanShell\] interpeter, and Samplers are only called from a single thread.Wiki Markup
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: BeanShellSampler.bshrc.
If a script file is supplied, that will be used, otherwise the script will be used.unmigrated-wiki-markup
Before invoking the script, some variables are set up in the \[http://www.beanshell.org/ BeanShell\] interpreter:
The contents of the Parameters field is put into the variable "Parameters". The string is also split into separate tokens using a single space as the separator, and the resulting list is stored in the String array bsh.args.
...