Skip to main content

Jmeter functions

Jmc give a Java way to call Jmeter functions :

Function List#

TypeNameCoveredOnly JMCDescription
InformationthreadNumโœ…get thread number
InformationthreadGroupNameโœ…get thread group name
InformationsamplerNameโœ…get the sampler name (label)
InformationmachineIPโœ…get the local machine IP address
InformationmachineNameโœ…get the local machine name
Informationtimeโœ…return current time in various formats
InformationtimeShiftโœ…return a date in various formats with the specified amount of seconds/minutes/hours/days added
Informationlogโœ…log (or display) a message (and return the value)
Informationlognโœ…log (or display) a message (empty return value)
InputStringFromFileโœ…read a line from a file
InputFileToStringโœ…read an entire file
InputCSVReadโœ…read from CSV delimited file
InputXPathโœ…Use an XPath expression to read from a file
InputStringToFileโœ…write a string to a file
Calculationcounterโœ…generate an incrementing number
FormattingdateTimeConvertโœ…Convert a date or time from source to target format
Calculationdigestโœ…Generate a digest (SHA-1, SHA-256, MD5...)
CalculationintSumโœ…add int numbers
CalculationlongSumโœ…add long numbers
CalculationRandomโœ…generate a random lowercase alpha value (based on RandomString )
CalculationrandomAlphaโœ…โœ…generate a random lowercase alpha numeric value (based on RandomString )
CalculationrandomAlphaNumericโœ…โœ…generate a random number
CalculationRandomDateโœ…generate random date within a specific date range
CalculationRandomFromMultipleVarsโœ…extracts an element from the values of a set of Variables separated by |
CalculationRandomStringโœ…generate a random string
CalculationUUIDโœ…generate a random type 4 UUID
Scriptinggroovyโœ…run an Apache Groovy script
ScriptingBeanShellneverrun a BeanShell script
ScriptingjavaScriptโœ…process JavaScript (Nashorn)
Scriptingjexl2โœ…evaluate a Commons Jexl2 expression
Scriptingjexl3โœ…evaluate a Commons Jexl3 expression
PropertiesisPropDefinedโœ…Test if a property exists
Propertiespropertyโœ…read a property
PropertiesPneverread a property (shorthand method)
PropertiessetPropertyโœ…set a JMeter property
Variablessplitโœ…Split a string into Variables
Variablesevalโœ…evaluate a variable expression
VariablesevalVarโœ…evaluate an expression stored in a variable
PropertiesisVarDefinedโœ…Test if a variable exists
VariablesVโœ…Rename to variableValue evaluate a variable name
Stringcharโœ…Rename to chars ,generate Unicode char values from a list of numbers
StringchangeCaseโœ…Change case following different modes
StringescapeHtmlโœ…Encode strings using HTML encoding
StringescapeOroRegexpCharsโœ…quote meta chars used by ORO regular expression
StringescapeXmlโœ…Encode strings using XMl encoding
StringregexFunctionโœ…parse previous response using a regular expression
Stringunescapeโœ…Process strings containing Java escapes (e.g. \n & \t)
StringunescapeHtmlโœ…Decode HTML-encoded strings
Stringurldecodeโœ…Decode a application/x-www-form-urlencoded string
Stringurlencodeโœ…Encode a string to a application/x-www-form-urlencoded string
StringTestPlanNameโœ…Return name of current test plan