JMeter – Changing user defined variables from command line

Well, with -J argument you are setting PROPERTY, and in User Defined Variables config – VARIABLE. It will define two different entities, although having the same name, they will have different values.

In your situation you can do the following.

  1. Set jmeter property value in command-line as above in your question

    ...-Jtestproperty=202

  2. In UDV config set variable with value from property:

    testproperty = ${__property(testproperty,,)}

    or

    testproperty = ${__P(testproperty,)}

  3. Use ${testproperty} further in the script.

As well you can possibly do the same wihout using variable and simply refer property as {__P(testproperty,)} to get value set in command-line.

Leave a Comment

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