JMeter elements are scoped, and variables mostly use regular expression extractors, and to use variable arguments without threading components, you need to set all variables
The JMeter function Helper provides a function to set global variable properties, which is similar to the variables added in user-defined variables.
__setproperty: Used to dynamically set the JMeter property
Return Original Value of property (default false)? : Returns the function result, defaults to No, and returns if filled in true
For example, the regular expression extracts the value of a variable
Setting global variables with BeanShell postprocessor
It means to set the obtained variable ${old_variable} to a global variable and reference it with the new name New_variable
Use the _p function in thread Group 2 to invoke the JMeter property, get the property value, and implement cross-thread group, parameter value passing.
Note: ${__p (new_variable,)} There is a comma behind it. Do not forget that the variable is quoted successfully.
JMeter variable transfer between different thread groups