This project demonstrates Performance Testing using JMeter, providing a collection of tests to validate various endpoints of the API.
- Tests for GET, POST, PUT, DELETE requests
- Collection of tests covering different API endpoints
- JMeter
This repository contains a JMeter project for performance testing of the Restful-Booker Website.
- Clone the repository to your Local Machine From:
https://github.com/rahulchandradasrcd/rest-booking-api-performance-testing-using-jmeter.git
- Open JMeter and load the test plan.
- Configure the necessary settings and parameters in the test plan.
- Run all Test plan.
- To run the test plan through CMD (Non GUI mode), use the following command:
jmeter -n -t Test_100.jmx -l report\Test_100.jtl
This command runs JMeter in non-GUI mode (-n), specifies the test plan file (-t), and writes the results to a JTL file (-l).
- To run the test plan through CMD (GUI mode), use the following command:
jmeter -g report\Test_100.jtl -o report\Test_100.html
This command runs JMeter in GUI mode (-g), making report to htl file (-l), and writes the report results to a html file (-l).
The sample test plan includes the following components:
- Thread Group:
- Thread Count: 10
- Ramp-Up Time: 10 second
- Explanation:
- Thread Count: Represents the number of virtual users (threads) executing the test concurrently.
- Ramp-Up Time: Represents the time taken for all threads to start executing.
- HTTP Proxy Server:
- Used for recording the script of sample pages.
- Logic Controllers:
- Loop Controllers:-
- Loop Count: 01
- Loop Controllers:-
- Config Eelements:
- http header manager
- json extractor
- Listeners:
- view result trees
- summary report
- aggrigate report
- Save and Run the test plan
- Execution:
- Run all the test plan sequentially
- you can start your execution with 100 thread group until error rate is 1.0%
- Point to explore:
- Running through CMD (Non GUI mode).
- Running through CMD (GUI mode) for generating html report.
- 2000 Concurrent Request with 01 Loop Count; Avg TPS for Total Samples is ~ 200 And Total Concurrent API requested: 12000.
- 2500 Concurrent Request with 01 Loop Count; Avg TPS for Total Samples is ~ 121 And Total Concurrent API requested: 15000.
- 2600 Concurrent Request with 01 Loop Count; Avg TPS for Total Samples is ~ 260 And Total Concurrent API requested: 15600.
- 2700 Concurrent Request with 01 Loop Count; Avg TPS for Total Samples is ~ 217 And Total Concurrent API requested: 16200.
- 2800 Concurrent Request with 01 Loop Count; Avg TPS for Total Samples is ~ 195 And Total Concurrent API requested: 16800.
- 2900 Concurrent Request with 01 Loop Count; Avg TPS for Total Samples is ~ 157 And Total Concurrent API requested: 17400.