jmeter pass command line variables into a jmx

All you need to do is start your JMeter from the command line (or shell) with the -J option.
For example :

-JTestIP=10.0.0.1

And in your script, to get the value, just use function _P:

  • http://jmeter.apache.org/usermanual/functions.html#__P

Example:

${__P(TestIP)}

That should do it.

Note you should put a default value in case you run the script without passing that JMeter property like:

${__P(TestIP,1.1.1.1)}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)