leeand00
leeand00

Reputation: 26392

In JMeter, can you specify variables to fill in for an HTTP Request Default?

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.

Upvotes: 2

Views: 540

Answers (1)

Kranthi Paidi
Kranthi Paidi

Reputation: 291

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

Upvotes: 3

Related Questions