How to record login test in Jmeter

Add the BlazeMeter plugin to the chrome browser.

Follow the steps given below for successful integration of the BlazeMeter plug-in into your Chrome browser.

  • Launch Chrome.
  • Go to the web store and search for BlazeMeter.
  • Click on the “ADD TO CHROME” button.
  • Create an account on BlazeMeter.com, their recorder is free with account creation.
  • You will get a Blazemeter icon on your toolbar.
  • Click on that icon and it will show you the recorder toolbox

Recording Login Test

  • Now, we will record our test using the Blazemeter plug-in.
  • Launch Chrome and hit the WEBSITE login page.
  • Fill in the login credentials.
  • Click on the Blazemeter icon on the toolbar menu.
  • Enter the name of the test as “BP LOGIN”.
  • Click on the red button to start recording.
  • Then, click on the login button to get logged in to the website.
  • Once you get logged in, click on the stop recording button to stop recording actions further
  • Click the Save and download button
  • Now, click on the “.jmx” button to download a .jmx file of the recorded script.
  • Now, we will create a test plan in JMeter and import the downloaded .jmx file into our test plan.

Create JMeter Test Plan

  • Open Jmeter.
  • Go to File > Open, select the downloaded “BP LOGIN.jmx” file and click on Open.

The following image shows the directory structure of the Login Test node after importing the “BP LOGIN.jmx” file.

We can see that the “BP LOGIN.jmx” has included all the necessary components such as Header manager, Cache Manager, samplers, etc.

Click on the first sampler under the thread group, here we can check the login credentials which we have used to login into the BP website.

Add listeners

  • Select the login_Test plan node and right-click on the selected item.
  • Select Listener > View Results in Table option

Verify the output

Leave a comment

Your email address will not be published. Required fields are marked *