Load Testing

In this post, I will discuss how to perform load testing on a website using BlazeMeter and JMeter.

Let’s start

Installation

  • Download and install Java from here: Link
  • Download and install JMeter from here: Link
  • Install the BlazeMeter chrome extension from the Chrome Store. Log in to the BlazeMeter after it has been installed – Link

Prerequisites

  • Install the above-mentioned programs.
  • I suggest a multicore CPU with four or more cores.
  • Memory 16GB of RAM is a good value.

Now you are all set to do load testing on a website.

✅Now I will talk about how to create a JMX file using BlazeMeter.

  1. First of all, you have to pick a website where you will perform load testing. Please don’t use any production website; use any testing demo site.
  2. Record User Interactions
    • Navigate to the web application you want to test in your Chrome browser.
    • Click on the BlazeMeter extension icon in your toolbar to open the extension.
    • Click the “Record” button to start recording your interactions.
    • Interact with the web application as a user would. Navigate through different pages, click buttons, fill out forms, and perform various actions.
    • When you’re done recording, click the “Stop” button in the BlazeMeter extension.
  3. Export the Recorded Script
    • After stopping the recording, you will be prompted to save the recorded interactions as a JMeter test script.
    • Enter name and save the JMX file, then paste: apache-jmeter-5.6.2\bin in this folder.

✅Let’s see how to open it in JMeter and Configure Test Plan

  1. Open JMeter. Go to apache-jmeter-5.6.2\bin this location double click on jmeter.bat.
  2. Now clicked on File => Open.
  3. Select your JMX file.

Configure your Test as your test plan

  • Clicked on Thread Group
    • Keep the number of Thread 100
    • Keep Ramp-up period 10.
    • Disable all the assertion and Listener. This is very important to disable all listeners. 
    • Now Save the file.

Run JMX file and generate a report.

Test execution

  • JMeter should be initialized in non-GUI mode.
  • Make a report folder in the bin folder.
  • Run Command in the jmeter\bin folder.

Make JTL file

jmeter -n -t  your_jmx_file.jmx -l jtl_file_name.jtl

This command will generate a JTL file

Let’s See how to Make HTML Report

jmeter -g report\jtl_file_name.jtl -o report.html

So this command will generate a Html report.

✅ Now increase the number of user and perform test again and again

✅ Find Out how many request/user web application can handle with almost zero (0) error rate.

✅ Find Out how many request/user web application can handle with almost 1% error rate.

Leave a Comment

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