Functions in Jmeter Bean Shell

Type of function Name Comment
Information threadNum get thread number
Information machineName get the local machine name
Information time return current time in various formats
Information log log (or display) a message (and return the value)
Information logn log (or display) a message (empty return value)
Input StringFromFile read a line from a file
Input CSVRead read from CSV delimited file
Input XPath Use an XPath expression to read from a file
Calculation counter generate an incrementing number
Calculation intSum add int numbers
Calculation longSum add long numbers
Calculation Random generate a random number
Scripting BeanShell run a BeanShell script
Scripting javaScript process JavaScript (Mozilla Rhino)
Scripting jexl evaluate a Commons Jexl expression
Properties property read a property
Properties P read a property (shorthand method)
Properties setProperty set a JMeter property
Variables split Split a string into variables
Variables V evaluate a variable name
Variables eval evaluate a variable expression
Variables evalVar evaluate an expression stored in a variable
String regexFunction parse previous response using a regular expression
String char generate Unicode char values from a list of numbers
String unescape Process strings containing Java escapes (e.g. \n & \t)
String unescapeHtml Decode HTML-encoded strings
String escapeHtml Encode strings using HTML encoding

Reference / details – http://jakarta.apache.org/jmeter/usermanual/functions.html

Advertisements

2 Comments

Filed under J-testing, JMeter

2 responses to “Functions in Jmeter Bean Shell

  1. This paragraph is really a nice one it helps new the web people, who are wishing for
    blogging.

  2. Thanks. It may also be worth checking Using JMeter Functions post which not only lists functions but also provides real-life use cases and examples.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s