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 whi
I would suggest to substitute all environment-specific variables or values with JMeter Properties. See following functions for reference:
For example you can define a property called hostname in either jmeter.properties file or as JMeter command line argument as follows
jmeter -Jhostname=169.140.130.120 -n -t yourscript.jmx -l yourscriptresults.jtl
and refer to in inside your script as:
${__P(hostname,)}
or${__property(hostname,,)}See Apache JMeter Properties Customization Guide for more details.