In my test scenario I have to test 2 urls with different host and port under same test plan. Is it possible to do so
2 Answers
You can make variable as property and send to jmeter script
Add to Test Plan In User define variables 2 rows:
baseUrl with Value ${__P(baseUrl,localhost)}
port with Value ${__P(port,8080)}
localhost and 8080 are default values you can change it
and when you execute add the values you want e.g.:
jmeterw.cmd ... -JbaseUrl=192.168.0.33 -Jport=80

- 56,308
- 23
- 131
- 233
Define your host and port combinations in a CSV
endpoints.csv
file like:somehost,someport someotherhost, someotherport
and put the CSV file to the "bin" folder of your JMeter installation
Add CSV Data Set Config to your test plan and configure it like:
Set HTTP Request sampler to use
${host}
and${port}
variables defined via the CSV Data Set Config
That's it, on each iteration (or virtual user hit) the next line will be picked up from the endpoints.csv
file.
See Using CSV DATA SET CONFIG article for more information on parameterising JMeter tests using CSV files.

- 159,985
- 5
- 83
- 133
-
Thank you. I have created the variable and passed to host and port – anu shaji Jul 20 '17 at 06:01