You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be a way to initialize variables at the beginning of the test.
For instance:
a) Initialize variables based on properties
b) Set thread-group specific variables
In JMeter, variable should have thread scope, and it is unexpected for the variables from different threads to interfere.
The name User Defined Variable suggests that the config element configures variables, however, it configures test plan variables which is completely misleading
Actual behavior
Currently, User Defined Variables are replaced globally in the test plan which results in surprising behaviour. For instance, if several User Defined Variables located under different thread groups share a variable name, only one of the values win, and the same value is reused for all the threads.
To make this behaviour more clear and to prevent errors, UDVs should be only allowed on "root" level. More than one UDV block could make sense in case some variables rely on others being set before.
Frankly speaking, that documentation and the behavior were obscure to me until I analyzed the sources.
At the same time, the reasons for that behavior are not clear either.
I would suggest not to deprecate the UDV, but to separate these.
Global UDV and thread scoped UDV.
That way, the scopes of both would be clear whilst remaining backward compatible.
Expected behavior
There should be a way to initialize variables at the beginning of the test.
For instance:
a) Initialize variables based on properties
b) Set thread-group specific variables
In JMeter,
variable
should havethread
scope, and it is unexpected for the variables from different threads to interfere.The name
User Defined Variable
suggests that the config element configures variables, however, it configures test plan variables which is completely misleadingActual behavior
Currently,
User Defined Variables
are replaced globally in the test plan which results in surprising behaviour. For instance, if severalUser Defined Variables
located under different thread groups share a variable name, only one of the values win, and the same value is reused for all the threads.See also
Steps to reproduce the problem
udv_sharing.zip
JMeter Version
5.5
Java Version
17
OS Version
No response
The text was updated successfully, but these errors were encountered: