I have several JMeter test plans which should be executed in different environments, say Dev, Test, UAT, Live. In each test plan I would like to have a simple way to specify which environment to use. Each environment has a lot of configuration such as hostname, port, ssl-cert, user name, password, account numbers and other test data.
One thing I'm trying to achieve is the ease of switching environments while using JMeter GUI or running scenarios from build scripts.
One of my ideas is to use the "Include Controller" to include another jmx file which has list of User Defined Variables and other config elements. However, JMeter does not support variables in the included file name, so I cannot parametrise the scenario by an environment name. Include Controller supports JMeter parameter "includecontroller.prefix", but it is not very flexible, e.g. I cannot change it from JMeter GUI, I should change JMeter config files and restart it.
I've tried to use Switch Controller, but no luck, it doesn't switch configuration elements, only samplers.
What is the best practice to externalise environment specific configuration from test scenarios and share it between several scenarios?