You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by "vlsi (via GitHub)" <gi...@apache.org> on 2023/05/04 12:55:07 UTC

[GitHub] [jmeter] vlsi opened a new issue, #5877: Deprecate User Defined Variables, and hide it from the menus

vlsi opened a new issue, #5877:
URL: https://github.com/apache/jmeter/issues/5877

   ### 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 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.
   
   
   
   ### Steps to reproduce the problem
   
   <img width="577" alt="Test plan to reproduce the issue" src="https://user-images.githubusercontent.com/213894/236209123-f3aee29a-c724-48f2-816f-f870df18543a.png">
   
   [udv_sharing.zip](https://github.com/apache/jmeter/files/11397627/udv_sharing.zip)
   
   
   ### JMeter Version
   
   5.5
   
   ### Java Version
   
   17
   
   ### OS Version
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] markuswege commented on issue #5877: Deprecate User Defined Variables, and hide it from the menus

Posted by "markuswege (via GitHub)" <gi...@apache.org>.
markuswege commented on issue #5877:
URL: https://github.com/apache/jmeter/issues/5877#issuecomment-1538041753

   The behaviour of the User Defined Variables is documented:
   https://jmeter.apache.org/usermanual/component_reference.html#User_Defined_Variables
   
   UDV are initialized once at test start. 
   
   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] markuswege commented on issue #5877: Deprecate User Defined Variables, and hide it from the menus

Posted by "markuswege (via GitHub)" <gi...@apache.org>.
markuswege commented on issue #5877:
URL: https://github.com/apache/jmeter/issues/5877#issuecomment-1547517700

   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] vlsi commented on issue #5877: Deprecate User Defined Variables, and hide it from the menus

Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on issue #5877:
URL: https://github.com/apache/jmeter/issues/5877#issuecomment-1538050354

   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org