How to use JMeter for Login Authentication

In this JMeter video tutorial we will show how to create a successful login scenario with JMeter.

JMeter requires the following steps:

1. Set JMeter as a proxy and record your log-in flow (Click here for a video tuorial). You can also use BlazeMeter's Proxy recorder.

2. Identify two locations:
-- The GET request that gets the login form.
-- The POST request that posts the login credentials.

3. The response from the GET request will contain tokens which need to be extracted and sent as a parameter in the POST request.
-- Add a Regular Expression Extractor to store these tokens. (Click here for detailed instructions).
-- Include these tokens as parameters in the POST request.
See the 2nd video below for an example.



Here is a video showing the process from start to finish:




And another video that deals with dynamic authentication tokens (starting at 5:30):



Want to take your JMeter testing to the next level?

Run your own JMeter scripts in the cloud (JMeter-as-a-service) with up to 100,000 concurrent users, real time reporting and nice looking graphs :)

Want to learn more? You'll want to view our on-demand recording, How to Create Advanced Load Testing Scenarios with JMeter.
Have more questions? Submit a request


Please sign in to leave a comment.