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.
-
Set jmeter property value in command-line as above in your question
...-Jtestproperty=202 -
In UDV config set variable with value from property:
testproperty = ${__property(testproperty,,)}or
testproperty = ${__P(testproperty,)} -
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.