Normal way of parameterizing a JMeter test using external data is:
Use __P() function in the HTTP Authorization Manager like:
${__P(username,)}
it will return the username
property value
Pass the username
property to JMeter via -J
command-line argument like:
jmeter -Jusername=johndoe -n -t test.jmx ....
Another option is reading the value from an environment variable using __groovy() function:
${__groovy(System.getenv('username'),)}
or if you have Custom JMeter Functions plugin installed you can do the same using __env() function
${__env(username,,)}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…