I have several JMeter testing plans that should run in different environments, for example Dev, Test, UAT, Live. In each test plan, I would like to have an easy way to specify which environment to use. Each environment has a large configuration, such as host name, port, ssl-cert, username, password, account numbers and other test data.
One thing I'm trying to achieve is the ease of switching the environment when using the JMeter GUI or run scripts from build scripts.
One of my ideas is to use the "Include Controller" to include another jmx file that has a list of User Defined Variables and other configuration items. However, JMeter does not support variables in the included file name, so I cannot parameterize the script by the name of the environment. The Include Controller supports the JMeter parameter "includesecontroller.prefix", but it is not very flexible, for example. I cannot change it from the JMeter GUI, I have to change the JMeter configuration files and restart it.
I tried to use the Switch Controller, but with no luck, it does not switch the configuration items, but only samplers.
What is the best practice for externalizing an environment-specific configuration from test scripts and sharing it between multiple scripts?
java jmeter
kan
source share