JMeter – HTTP Authorization Manager
JMeter script handles browser authentication pop-ups using HTTP Authorization Manager. A ‘gatekeeper’ pop-up, like the one below, frequently occurs while downloading a file from an FTP server:
A browser displays this popup when the server requests a username and password. Regardless of the framework, which varies by browser (for example, Mozilla Firefox, Apple Safari, or Microsoft Internet Explorer), a username and password are required to access what are often fairly simple resources. You need to manage this with “HTTP Authorization Manager”, where the term “HTTP Authorization” comes from.
For websites that are restricted by server authentication, you can specify one or more user logins using the Authorization Manager.
How to add ‘HTTP Authorization Manager’ in the JMeter script?
You can follow below steps:
- Select the “Test Plan” node
- Right-click on the “Test Plan” node
- Hover the mouse on “Add”
- Hover the mouse on Config Element
- Click ‘HTTP Authorization Manager
Input fields of ‘HTTP Authorization Manager
- Name: to name the element
- Leave any comments randomly.
- Clear authentication every cycle? Kerberos authentication uses this option. If authentication is checked, it will be executed every time the main thread pool loop repeats, even if it has already been done. If each iteration of the main thread pool corresponds to a single virtual user, this is often useful.
- Set up thread groups to control deletion – With this option, you can specify whether a new iteration will involve the same user or a new one. It is linked to the “Same user each iteration” option in the Thread group.
- Username: Enter this username when requesting authorization.
- Password: The authorization password to use.
- Domain: The NTLM domain to use.
- Realm: The NTLM realm to use. The HttpClient sampler is the only application for the Realm.
- Mechanism: the type of authentication chosen. Depending on the Http Samplers used, JMeter can perform different types of authentications.
- Java
- BASIC
- HttpClient 3.1
- BASIC
- DIGEST
- HttpClient 4
- BASIC
- DIGEST
- KERBEROS