问题
I have a situation in jmeter while running the endpoint url keeps changing.
for example:
URL1 [QA]: Facebook/v1/account2
URL1 [dev]: Facebook/account
Some times end point url is changing but my scripts are same. How do I handle the end point change for the above conditions?
回答1:
You should use different property values for qa and dev
You can simply send different value in command line -J
jmeter -Jpath=Facebook/v1/account2 -t your.jmx
And then in Path field get path property value using __P function:
${__P(path)}
If you have multiple properties you can add different property files using -q, e.g.:
jmeter -q dev.properties -t your.jmx
And your dev.properties will be
path=Facebook/v1/account2
来源:https://stackoverflow.com/questions/58546799/jmeter-changing-values-per-environment