Skip to content

shafinrahman912/BookingAppLoadTesting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Content

Load testing Report

Concurrent Request Loop Count Avg TPS for Total Samples Error Rate Total Concurrent API request
1 1 1.98 0% 6
100 1 49.10 0% 600
500 1 238.45 0% 3000
1000 1 323.90 0% 6000
2000 1 313.52 0% 12000

Summary

  • Server can handle almost concurrent 2000 API call with almost zero (0) error rate.

Introduction

This document explains how to run a performance test with JMeter against a Booking Site.

Install

Java
https://www.oracle.com/java/technologies/downloads/

JMeter
https://jmeter.apache.org/download_jmeter.cgi

Click =>Binaries
=>apache-jmeter-5.6.2.zip

Prerequisites

  • As of JMeter 4.0, Java 8 and above are supported.
  • we suggest multicore cpu's with 4 or more cores.
  • Memory 16GB RAM is a good value.

Elements of a minimal test plan

  • Thread Group

    The root element of every test plan. Simulates the (concurrent) users and then run all requests. Each thread simulates a single user.

  • HTTP Request Default (Configuration Element)

  • HTTP Request (Sampler)

  • Summary Report (Listener)

Test Plan

Testplan > Add > Threads (Users) > Thread Group (this might vary dependent on the jMeter version you are using)

  • Name: Users

  • Number of Threads (users): 1, 100, 500, 1000, 2000

  • Ramp-Up Period (in seconds): 10

  • Loop Count: 1

    1. The general setting for the tests execution, such as whether Thread Groups will run simultaneously or sequentially, is specified in the item called Test Plan.

    2. All HTTP Requests will use some default settings from the HTTP Request, such as the Server IP, Port Number, and Content-Encoding.

    3. Each Thread Group specifies how the HTTP Requests should be carried out. To determine how many concurrent "users" will be simulated, one must first know the number of threads. The number of actions each "user" will perform is determined by the loop count.

    4. The HTTP Header Manager, which allows you to provide the Request Headers that will be utilized by the upcoming HTTP Requests, is the first item in Thread Groups.

Collection of API

List of API

Load the JMeter Script

  • File > Open (CTRL + O)
  • Locate the "OPENCART_T1.jmx" file contained on this repo
  • Continue open OPENCART_T1 to OPENCART_T6
  • Open those file
  • The Test Plan will be loaded

testPlan

Read Test Data from CSV file in Jmeter

  • Create a CSV file in the test suite folder and add test data to it.
    createCSV

  • Add a Config Element CSV Data Set Config in Jmeter.

configCSV

  • Configure ' CSV Data Set Config ' based on the need such as providing path of CSV file and variable names and other configs.

readCSV

  • Run the test to see if data from the CSV file is read and populated in the results.

  • Run the test to see if data from CSV file is read and populated in the results.

Test execution from GUI

  • JMeter should be initialized in GUI mode.

  • Click on Run Button.
    run

  • Check Different Types of Report.

    Summary and Aggregate Report for Number of Threads 1 ; Ramp-Up Period 10s

    Summary Report Aggregate Report
    BookingApp_t1_summary BookingApp_t1_agg

    Aggregate Report for Number of Threads 2000 ; Ramp-Up Period 10s

    Aggregate Report
    BookingApp_t2000_summary

Test execution from the Terminal

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

Make csv file

  • n: non GUI mode
  • t: test plan to execute
  • l: output file with results
  jmeter -n -t  BookingApp_csv_dataset_t1.jmx -l BookingAppLoadTesting\report\BookingApp_csv_dataset_t1.csv

BookingApp_t1_csv

Make jtl file

  jmeter -n -t  BookingApp_csv_dataset_t1.jmx -l BookingAppLoadTesting\report\BookingApp_csv_dataset_t1.jtl

Then continue to upgrade Threads( 1, 100, 500, 1000, 2000 ) by keeping Ramp-up-Period Same.

BookingApp_t1_jtl BookingApp_allJTLs

After completing this command

Make html file

jmeter -g BookingAppLoadTesting\report\BookingApp_csv_dataset_t1.jtl -o BookingAppLoadTesting\report\BookingApp_csv_dataset_t1.html
  • g: jtl results file

  • o: path to output folder

BookingApp_t1_csv_cmd BookingApp_reports

HTML Report

Number of Threads 1 ; Ramp-Up Period: 10s

Requests Summary Statistics
BookingApp_t1_100pass BookingApp_t1_stats

Number of Threads 100 ; Ramp-Up Period 10s

Requests Summary Statistics
BookingApp_t1_100pass BookingApp_t100_stats

Number of Threads 500 ; Ramp-Up Period 10s

Requests Summary Statistics
BookingApp_t1_100pass BookingApp_t500_stats

Number of Threads 1000 ; Ramp-Up Period 10s

Requests Summary Statistics
BookingApp_t1_100pass BookingApp_t1000_stats

Number of Threads 2000 ; Ramp-Up Period 10s

Requests Summary Statistics
BookingApp_t1_100pass BookingApp_t2000_stats

Transaction Per Second

Transaction Per Second Number of Threads 2000 ; Ramp-Up Period 10s

BookingApp_t2000_tps