更新时间:2023-02-22 11:15:42
Let's start clean:
In the User Defined Variables configure the variable with the name of url
and the value of ${__P(url,)}
In the HTTP Request sampler (or even better HTTP Request Defaults) put ${url}
into "Server Name or IP" field:
Run your test in command-line non-GUI mode like:
jmeter -n -t your_script.jmx -Jurl=abcdef.com -f -l result.jtl
mind this -f
argument which tells JMeter to overwrite the existing results file (it might be the case you're looking into "old" results where the url
property value was starting with 1
)
That's it, you should see the HTTP Request sampler making a call to abcdef.com
in the .jtl results file. And if you change this url
parameter - you will see the impact in the .jtl results file: