Hi, In the JMeter Best Practices: https://jmeter.apache.org/usermanual/best-practices.html
It says To "Share variables between threads and thread groups", there are various options: - Store the variable as a property - properties are global to the JMeter instance - Write variables to a file and re-read them. - Use the bsh.shared namespace - see above <https://jmeter.apache.org/usermanual/best-practices.html#bsh_variables> - Write your own Java classes Using the bsh.shared namespace seems to be an appealing option, However, the BeanShell scripting is *deprecated*, so here is my question: Would the following still be the recommended best practices? The sample .bshrc files contain sample definitions of getprop() and setprop() methods. Another possible method of sharing variables is to use the "bsh.shared" shared namespace. For example: if (bsh.shared.myObj == void){ // not yet defined, so create it: myObj = new AnyObject(); } bsh.shared.myObj.process(); Rather than creating the object in the test element, it can be created in the startup file defined by the JMeter property "beanshell.init.file". This is only processed once. If not, is there any groovy based mechanism that provides the same functionalities? Thanks
