Skip to content

Performance testing REST APIs using Apache JMeter—featuring load and stress test plans for the Restful‑Booker and DMoney transaction APIs, complete with CSV-driven scenarios, JTL reports, and HTML/Excel result analysis.

Notifications You must be signed in to change notification settings

Prantika71/Performance_Testing_Using_JMeter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Performance Testing Using JMeter

Content


Introduction

For this project,

  • Restful-Booker: A Books API for load testing and Stress testing
  • Dmoney A Website Transaction API for API Chainning (JMeter Collection). Also, I have taken CSV data files to run multiple APIs using Three Threads (Deposit, SendMoney, and Payment) in Jmeter, For Transaction APIs.

Test Case Scenario

Restful_Booker

-- Create a Collection of APIs (JMeter Collection) of Login API, Create Booking API, and Search API HTTP requests.

1. Add the following properties to the Header Controller:

Accept: */*

2. Login

Request URL:

Pre-request Script:

{
  "body": {
    "username": "admin",
    "password": "password123"
  }
}

3.Create Booking

○ Body:

{
"firstname": "Generate Random FirstName",
"lastname": "Generate Random LastName",
"totalprice": Generate random amount,
"depositpaid": true,
"bookingdates": {
"checkin": "2024-01-01",
"checkout": "2024-01-02"
}
}

4.Search Booking

and Scenario: 120,000 users over a 12-hour period log in, create a booking, and search for the booking.

Test Cases Scenario - DMoney Transaction APIs

Dmoney Transactions APIs:

  1. Admin creates an Agent, 2 random Customers, and a Merchant.
  2. Deposit some money from the SYSTEM account to the Agent.
    • System account: SYSTEM Range: 10 TK to 10,000 TK
  3. Agent deposits money to one of the Customers.
    • Hint: fromAc: Agent, toAc: Customer
  4. Then, send money from one Customer to another Customer.
    • Hint: fromAc: Customer, toAc: Customer
  5. Make a payment from the second Customer to the Merchant.
    • Hint: fromAc: Customer, toAc: Merchant

Scenario:

○ 5 agents perform deposits for 10 customers. ○ 5 customers send money to another 10 customers. ○ 5 customers make payments to 2 merchants.

How to run this project

Using JMeter:

  • clone this project

      https://github.com/Prantika71/Performance_Testing_Using_JMeter
    
  • Open Apache Jmeter

  • From Jmeter Click on Open then open the JMX file

  • Run the file

    • **For Booking APIs JMeter Collection:
     jmeter -n -t .\Booking.jmx -l .\Booking.jtl -e -o Reports
    • *For Booking APIs JMeter Collection:
jmeter -n -t .\Dmoney.jmx -l .\Dmoney.jtl -e -o Reports

Technology Used

Load and Stress Test Excel Report

For the Load test and Stress test Excel report check the link - view excel report file

HTML Report Generate

Load Testing HTML Report

image

Stress Testing HTML Report

image

Since this is a public server, while I was doing stress testing, the server behaved unexpectedly, and I couldn't execute stress tests properly. Whenever I increase the number of users above 4000, it suddenly shows an error rate of 0%, and after 10000 users, it shows an error rate above 1%. So for me finding a bottleneck becomes very difficult and I need to consider the bottleneck point at 4000 users with an error rate of 0.03%.

Generated HTML report for DMoney Jmeter Collection Test

image

About

Performance testing REST APIs using Apache JMeter—featuring load and stress test plans for the Restful‑Booker and DMoney transaction APIs, complete with CSV-driven scenarios, JTL reports, and HTML/Excel result analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published