How To Record The Script and Perform Load Testing

Posted By : Kishor Kumar Singh | 03-Apr-2020

Load testing is an essential part of quality assurance services that must be performed to accurately analyze system behavior. To perform load testing, first of all, we have to record the script using blaze meter and download the file in the format of .jmx. Then we need to open the Jmeter and upload the .jmx file in the JMeter. And also we have to prepare a .csv file to pick the authentication token. We can see the reports by using the Listeners like- View results tree, View result in a table, Summary report, etc. Step by step process is given below to record the scripts and perform Load Testing.

 

Steps to record the script using blaze meter:

  1. Add the blaze meter extension for the browser
  2. Create an account and Login into the blaze meter
  3. Now open URL and enter the script name in the blaze meter
  4. Add the steps and start recording
  5. When recording is completed, stop this and download .jmx file

 

Steps to Create the CSV file for authentication token:

  1. Open the application and press F12 to inspect the elements 
  2. Now login into the application
  3. Open the network call and copy the authentication token
  4. Open a CSV file and paste the copied authentication token into this CSV file and Save it

 

Opening Jmeter In Windows

In Windows to open the Jmeter, we have to open the Setup file and go to the bin folder. And here we have to double click on the executable file.

 

Opening Jmeter In Ubuntu

In Ubuntu to open the Jmeter, we have to open the Setup file and go to the bin folder. And here we have to find the .sh file and copy the path. Now we have to open the Terminal and paste the copied path. 

 

How To Perform the Load Test

To Perform the Load test, first of all, we have to replace the authentication token with ${variable} and save the file. Now open the Jmeter and then click on the “File” option. Here click on the “Open” option and select the .Jmx file. Now go to “Thread Group” where we have to configure the values in the No. of threads(user), Ramp-up Period(Seconds) and Loop count. The definition is given below-

No. of threads(user) - It represents the total no. of virtual users used in the load execution.

Ramp-up Period(Seconds) - It tells the time taken by the JMeter to create the number of threads per iteration

Loop count - It tells that how much times test will execute

 

To Pick the authentication from the .CSV file we have to use a “Config element- csv data set config”. Now we have to configure the csv data set config. In the File section, we have to click on the browse button and upload the authentication csv file. In the “variable name” section we have to enter a variable name. 

To see the load testing reports we need to add the Listeners. For this Right-click on the Thread Group and select the Listeners option. From here we can add Listeners like- View results from the tree, View results in a table, Summary report, etc. 

Now click on the “Run” button and observe the reports. We can also download the reports giving the paths to the files in listeners. We can find the Latency, Deviation, Average Time, Error Percent, Throughput, API Status, Sample Time, Connect Time, etc.

 

Conclusion

It's very easy to perform load testing using JMeter. For this, we just have to follow some steps and to record the script and need to upload this script in the JMeter and we can see the result of load testing using the Listeners.

Related Tags

About Author

Author Image
Kishor Kumar Singh

Kishor Kumar Singh is highly dedicated towards work and he is a great team player. He believes that “No amount of testing can prove a software right, a single test can prove a software wrong".

Request for Proposal

Name is required

Comment is required

Sending message..