Jmeter functions
Jmc give a Java way to call Jmeter functions :
Function List#
| Type | Name | Covered | Only JMC | Description |
|---|---|---|---|---|
| Information | threadNum | โ | get thread number | |
| Information | threadGroupName | โ | get thread group name | |
| Information | samplerName | โ | get the sampler name (label) | |
| Information | machineIP | โ | get the local machine IP address | |
| Information | machineName | โ | get the local machine name | |
| Information | time | โ | return current time in various formats | |
| Information | timeShift | โ | return a date in various formats with the specified amount of seconds/minutes/hours/days added | |
| 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 | FileToString | โ | read an entire file | |
| Input | CSVRead | โ | read from CSV delimited file | |
| Input | XPath | โ | Use an XPath expression to read from a file | |
| Input | StringToFile | โ | write a string to a file | |
| Calculation | counter | โ | generate an incrementing number | |
| Formatting | dateTimeConvert | โ | Convert a date or time from source to target format | |
| Calculation | digest | โ | Generate a digest (SHA-1, SHA-256, MD5...) | |
| Calculation | intSum | โ | add int numbers | |
| Calculation | longSum | โ | add long numbers | |
| Calculation | Random | โ | generate a random lowercase alpha value (based on RandomString ) | |
| Calculation | randomAlpha | โ | โ | generate a random lowercase alpha numeric value (based on RandomString ) |
| Calculation | randomAlphaNumeric | โ | โ | generate a random number |
| Calculation | RandomDate | โ | generate random date within a specific date range | |
| Calculation | RandomFromMultipleVars | โ | extracts an element from the values of a set of Variables separated by | | |
| Calculation | RandomString | โ | generate a random string | |
| Calculation | UUID | โ | generate a random type 4 UUID | |
| Scripting | groovy | โ | run an Apache Groovy script | |
| Scripting | BeanShell | never | run a BeanShell script | |
| Scripting | javaScript | โ | process JavaScript (Nashorn) | |
| Scripting | jexl2 | โ | evaluate a Commons Jexl2 expression | |
| Scripting | jexl3 | โ | evaluate a Commons Jexl3 expression | |
| Properties | isPropDefined | โ | Test if a property exists | |
| Properties | property | โ | read a property | |
| Properties | P | never | read a property (shorthand method) | |
| Properties | setProperty | โ | set a JMeter property | |
| Variables | split | โ | Split a string into Variables | |
| Variables | eval | โ | evaluate a variable expression | |
| Variables | evalVar | โ | evaluate an expression stored in a variable | |
| Properties | isVarDefined | โ | Test if a variable exists | |
| Variables | V | โ | Rename to variableValue evaluate a variable name | |
| String | char | โ | Rename to chars ,generate Unicode char values from a list of numbers | |
| String | changeCase | โ | Change case following different modes | |
| String | escapeHtml | โ | Encode strings using HTML encoding | |
| String | escapeOroRegexpChars | โ | quote meta chars used by ORO regular expression | |
| String | escapeXml | โ | Encode strings using XMl encoding | |
| String | regexFunction | โ | parse previous response using a regular expression | |
| String | unescape | โ | Process strings containing Java escapes (e.g. \n & \t) | |
| String | unescapeHtml | โ | Decode HTML-encoded strings | |
| String | urldecode | โ | Decode a application/x-www-form-urlencoded string | |
| String | urlencode | โ | Encode a string to a application/x-www-form-urlencoded string | |
| String | TestPlanName | โ | Return name of current test plan |