JMeter __V 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.
TL;DR: __V (Variable evaluation) resolves a dynamically built variable name โ e.g. ${__V(row_${__counter(FALSE,)})} reads row_1, row_2, โฆ โ solving the โvariable name thatโs itself made of variablesโ problem that plain ${...} substitution canโt handle in one step.
The V (variable) function returns the result of evaluating a variable name expression. This can be used to evaluate nested variable references (which are not currently supported).
For example, if one has variables A1,A2 and N=1:
\${A1}- works OK\${A\${N}}- does not work (nested variable reference)\${__V(A\${N})}- works OK.A\${N}becomesA1, and the__Vfunction returns the value ofA1
| Name | Required | Description |
|---|---|---|
| Variable name | Yes | The variable to be evaluated. |
| Default value | No | The default value in case no variable found, if itโs empty and no variable found function returns the variable name |
Example
Section titled โExampleโ${__V(row_${__counter(FALSE,)})} โ resolves to the value of row_1, row_2, ... as the counter incrementsThis pattern shows up whenever youโve extracted multiple values with Match No. = -1 (producing var_1, var_2, โฆ) and need to loop through them by a computed index โ see __eval for the related โevaluate this string as an expressionโ function.