Menu Close
    Searching for an experienced eCommerce & Marketplace Development Company ?

    Load Testing Login Page using JMeter

    Introduction

    Apache JMeter is open source software which is purely based on Java, designed to test functional and performance both on static and dynamic resources. It can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. You can also use it to perform a functional test on websites, databases, LDAPs, webservices etc.

    JMeter is not a browser; JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does, it’s possible to view the response as HTML.

    JMeter simulates a group of users sending requests to a target server, and returns statistics that show the performance/functionality of the target server/application via tables, graphs, etc.

    image-7

    Some Features of JMeter

    • JMeter can conduct load and performance test for many different server types − Web – HTTP, HTTPS, SOAP, FTP, Database via JDBC, LDAP, JMS, Mail – POP3, etc.
    • It’s an open source software and freely available.
    • Simple and intuitive GUI. So, that user can use it easily.
    • JMeter store its test plans in XML format. This means you can generate a test plan using a text editor.
    • Multi-threading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups.
    • Perform automated and functional testing for the applications.
    • Easy correlation through ability to extract data from most popular response formats, HTML, JSON , XML or any textual format.

    Steps to create a Test Plan for Login Page

    Step 1:- Select Test Plan, right click on it and hover on add button then hover on Threads and click on Thread Group button.

    Test Plan->Add->Threads(users)->Thread group

    image-8

    Step 2:- Now fill the details for the Thread.

    The number of Threads(users): Threads means Virtual Users. Total numbers of virtual users you want to use for the test script execution.

    Ramp-up Period(in seconds): Ramp-up period defines how much time it takes to execute all thread(users). If Thread is 50 and Ramp-up time is 10 seconds then, it means It will take 10 seconds to execute 50 threads(5 thread per second).

    Loop Count: Loop Count is the number of executions for the script.

    image-9

    Step 3:- Now add the HTTP Request from the sampler where you can put the desired URL of your website on which you want to do load testing.

    Project_Name -> Add ->Sampler -> HTTP Request

    image-10

    Step 4:- Now put the domain of your Login Page into the ‘Server Name or IP’ field and put rest of the URL into the ‘Path’ field. If your domain contains https than put https into ‘Protocol’ field and change the HTTP request field to POST.

    Now you want to pass the credentials of login page then under parameters tab click on add button to pass username and password. Under the name column pass the field name of username and password by inspecting the element.

    image-11

    Step 5:- Right click on “Project_Name(Webkul)” and click on Add button then click on Listener and click on View Results Tree to view the result of your login page test execution.

    Project_Name -> Add ->Listener -> View Results Tree

    image-12

    Listeners allows us to view and analyse the Sampler request and response in the form of tables, graphs, trees etc. You can access the sampler result in an ongoing load/stress test without waiting till end using Listeners.

    Listeners can be added anywhere in a test plan. It will gather data only from elements defined in its scope.

    image-13

    Step 6:- Now add the HTTP Cookie Manager to manage the cookies of your script.

    Project_Name -> Add ->Config Element -> HTTP Cookie Manager

    image-14

    Step 7:- Now to run the script click on run button and see the result of script on the Listener which you have added.

    image-15

    In case you have any queries then feel free to ask in the comment section below.

    This is all about Load Testing of a Login Page using JMeter.

    Thanks for reading this blog.

    Happy testing!!

    . . .
    Discuss on Helpdesk

    Leave a Comment

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


    2 comments

  • Piyush
    Nice Blog!!
    • Subhangi (Moderator)

      Hello Piyush,

      Thanks for your appreciation.

      Thanks,

      Webkul Team.

  • Back to Top