This repository contains JMeter test plans and reports for performance testing of the Restful Booker API and functional testing of the Dmoney API.
- Apache JMeter installed (latest version recommended)
- Java 8 or later installed
- Git installed
- Internet connection (for running API requests)
.
├── booking.jmx # JMeter test plan for Restful Booker API
├── dmoney.jmx # JMeter test plan for Dmoney API
├── Resources/
│ ├── deposit.csv # CSV file for agent deposits
│ ├── sendMoney.csv # CSV file for customer money transfers
│ ├── payment.csv # CSV file for customer payments
├── booking-api-test-report.xlsx # Load & stress test reports in Excel format
├── Report/ # HTML test reports (ignored in Git)
├── .gitignore # Excludes dmoney.jtl and Report folder
├── README.md # This file
- Open JMeter.
- Load the booking.jmx file.
- Configure test execution:
- Set thread count based on your desired user load.
- Ensure Gaussian Random Timer (Deviation: 2000ms, Constant Delay: 500ms) is used.
- Run the test and observe the results.
- Generate reports:
- Load Test (5min, 10min, 20min load steps)
- Stress Test (gradually increasing load to find bottleneck)
- Generate an HTML Report and save it.
- Run the following command in your terminal to execute the JMeter test in non-GUI mode:
jmeter -n -t .\booking.jmx -l .\booking.jtl -e -o Reports
-n
→ Non-GUI mode (for faster execution)-t .\booking.jmx
→ Load the test script (booking.jmx
)-l .\booking.jtl
→ Store results inbooking.jtl
-e
→ Enable HTML report generation-o Reports
→ Save reports to theReports
folder
- Open JMeter.
- Load the dmoney.jmx file.
- Ensure CSV files (
deposit.csv
,sendMoney.csv
,payment.csv
) are correctly linked. - Run the test to validate transactions.
- Verify successful assertions in JMeter results.
- Generate an HTML report. Run the following command in your terminal to execute the JMeter test in non-GUI mode:
jmeter -n -t .\dmoney.jmx -l .\dmoney.jtl -e -o Reports
Scenario: 120,000 users over a 12-hour period log in, create a booking, and search for the booking.
This test plan (booking.jmx
) automates API testing for the RESTful Booker API, covering:
✔ Authentication
✔ Booking creation with randomized data
✔ Booking search and validation
1️⃣ Set Headers (Using HTTP Header Manager)
Accept: */*
2️⃣ Login & Authentication
- Endpoint:
https://restful-booker.herokuapp.com/auth
- Method:
POST
- Request Body:
{ "username": "admin", "password": "password123" }
3️⃣ Create Booking
-
Endpoint:
https://restful-booker.herokuapp.com/booking
-
Method:
POST
Request Body (Dynamic Data):
{
"firstname": "Generate Random FirstName",
"lastname": "Generate Random LastName",
"totalprice": "Generate random amount",
"depositpaid": true,
"bookingdates": {
"checkin": "2024-01-01",
"checkout": "2024-01-02"
}
}
Extract Booking ID:
Use JSON Extractor to capture bookingid
for validation.
4️⃣ Search Booking
-
Endpoint:
https://restful-booker.herokuapp.com/booking/<booking_id>
-
Method:
GET
Validation:
Ensure the response contains the correct booking details.
-
Request Summary
-
Stress Test Statistics from HTML Report Identified the bottleneck throughput by conducting a stress test.


This test simulates various financial transactions in the Dmoney API using JMeter to evaluate performance under concurrent load.
- User [(http://dmoney.roadtocareer.net/api-docs/user/)]
- Transactions [http://dmoney.roadtocareer.net/api-docs/transaction/]
- 5 agents perform deposits for 10 customers.
- 5 customers send money to another 10 customers.
- 5 customers make payments to 2 merchants.
-
Authentication
- Log in as an admin and generate a token.
- Use this token across all threads for secure transactions.
-
Test Configuration
- Create 3 Thread Groups:
- Agent Transactions (Deposit)
- Customer Transactions (Send Money)
- Merchant Transactions (Payment)
- Use CSV Data Set Config for dynamic user data:
deposit.csv
→ Agent & Customer account detailssendMoney.csv
→ Sender & Receiver customer detailspayment.csv
→ Customer & Merchant details
- Create 3 Thread Groups:
-
Dynamic Transaction Amount
- Implement Random Variable Controller to assign random small amounts to prevent zero balance issues.
-
Performance Settings
- Each thread has a ramp-up time of 120 seconds to simulate real-world usage.
-
Assertions for Validation
- Ensure that all transactions are successful using assertions.
- The
dmoney.jtl
file and theReport/
folder are excluded from Git to keep the repository clean. - The Excel file contains the detailed steps for both Load & Stress tests of the Restful Booker API.
This project ensures:
- Performance validation of the Restful Booker API under realistic load.
- Successful functional validation of the Dmoney API.
For any issues or improvements, feel free to open an Issue or Pull Request.