Benchmarking Bagisto for Login operation using JMeter

Updated 2 April 2020

In our last blog of Apache JMeter series we saw how we can record scenerios using Apache JMeter. In this blog we will see how to record and perform login authentication for Bagisto E-commerce using Apache JMeter.

STEP 1. Record the requests for login operation for your Bagisto store, just like we did in our previous blog. Now after setting up every element in JMeter, click on start then go to your browser and type your bagisto store domain/IP address.

STEP 2. Now once the login is successful, Stop your recording. Now all the requests for login operations have been recorded successfully.

STEP 3. Now select all your requests cut and paste them under Thread. and add the following elements: –

  1. CSV Data set login :- For passing the username and password as variables.
  2. HTTP Cookie Manager:- If you have an HTTP Request and the response contains a cookie, the Cookie Manager automatically stores that cookie and will use it for all future requests to that particular web site.
  3. Listener :- To view the results of our test.
  4. Timer :- To introduce some delay between our requests.
The final test plan should look like this

STEP 4. Now comes the most important part i.e “Extracting the CSRF Token“.

CSRF stands for Cross-Site Request Forgery. Generally, when we log into a website, it always asks for authentication. From a security point-of-view, developers mostly time pass the CSRF token with a login parameter. But our focus is on how to handle this CSRF token in JMeter.

For extracting CSRF, we have to add post processors under the GET REQUEST in the test plan. Then, add a regular expression extractor.

STEP 5. Create a csv file containing username, password of all users and add the CSV data set config file under the thread group.

STEP 6.

Passing all the variables i.e. token, user, pass for login and authentication.

STEP 7. Now we are good to go, click on Thread Group and enter the number of threads and ramp-up period for which you want to test your bagisto store. In this blog we will test our Bagisto store for :-

  1. Number of threads (users):- 10
  2. Ramp-up:– 0 sec

STEP 8. Check your results under the listener you have choose for your Plan. In this blog we are using Summary Report listener.

As you can see we have successfully tested login authentication with 10 users on our Bagisto E-commerece store.

Conclusion

You have successfully record and perform Login authentication for your Bagisto Store.

In case of any help or query, please contact us or raise a ticket.

Category(s) ecommerce
author
. . .

Leave a Comment

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


Be the first to comment.

Start a Project






    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home