JMeter __split function reference: syntax, parameters, and practical examples for parameterizing test plans with dynamic values.
Also documented in context in the full Functions and Variables reference.
The split function splits the string passed to it according to the delimiter,
and returns the original string. If any delimiters are adjacent, โ?โ is returned as the value.
The split strings are returned in the variables \${VAR_1}, \${VAR_2} etc.
The count of variables is returned in \${VAR_n}.
A trailing delimiter is treated as a missing variable, and โ?โ is returned.
Also, to allow it to work better with the ForEach controller,
__split now deletes the first unused variable in case it was set by a previous split.
Example:
Define VAR=โa||c|โ in the test plan.
\${__split(\${VAR},VAR,|)}This will return the contents of VAR, i.e. โa||c|โ and set the following variables:
VAR_n=4
VAR_1=a
VAR_2=?
VAR_3=c
VAR_4=?
VAR_5=null
| Name | Required | Description |
|---|---|---|
| String to split | Yes | A delimited string, e.g. โ`a |
| Name of variable | Yes | A reference name for reusing the value computed by this function. |
| Delimiter | No | The delimiter character, e.g. ` |