2

I'd like to be able to read a value out of a CSV file, or more ideally a .properties file with JMeter, and then use it in multiple Test Plans in the HTTP Request Defaults as the Server Name or IP, and the Port Number/

I wanted to set it up that way so that for a folder of different Test Plans that can be run, and there can be a single point of modification for any of the tests that can be run. But the ${} variables don't seem to populate in the HTTP Request Defaults.

leeand00
  • 25,510
  • 39
  • 140
  • 297

1 Answers1

3

You can do this with user-defined properties. The values for those user-defined properties can be controlled from a file. In the following example, I am controlling the environment the script needs to run against by a user defined property called env.

Defining a property

And then, I am using it in the http request defaults. You can do this for any property that you want to

enter image description here

Kranthi Paidi
  • 301
  • 1
  • 4
  • To get these property value from a file local to the project it looks like I'll need to use this: http://www.testautomationguru.com/jmeter-property-file-reader-a-custom-config-element/ – leeand00 Jul 26 '16 at 13:05