The simple definition of the ‘Login Config Element’ component in JMeter is the element used as a global component to add or override the credential in the following Samplers added to the test plan. This element is specially used for authentication. You can mention username and password in the login-config element and that can be replaced in the sampler.
How to add a ‘Login Config Element’?
You can follow the steps to add the Login Config element:
- Select the ‘Test Plan’ node
- Right-click on the ‘Test Plan’ node
- Hover the mouse on ‘Add’
- Hover the mouse on ‘Config Element‘
- Click ‘Login Config’
Input fields
‘Login Config Element’ has the following input fields in JMeter:
- Name: To provide element name
- Comments: To provide arbitrary comments (if any)
- Username: The username which needs to be added or overridden.
- Password: The default password to log in. Please note it stores the unencrypted password and passes the same to the test plan.
but how to replace in request ?
what will be the variable name ? ${Username} , ${Password} ?