How to remove hardcoding in the below code?
<stringProp name="Authorization.username">user123</stringProp><stringProp name="Authorization.password">pwd123</stringProp>
You can use __P() function to read the credentials from JMeter properties.
When you run JMeter test in command-line non-GUI mode you will be able to pass the credentials via -J
command-line arguments like:
jmeter -Jusername=user123 -Jpassword=pwd123 -t test.jmx .....
More information: