https://github.com/yahya123-hub/api-performance-testing-jsonplaceholder
This project focuses on performance testing of the JSONPlaceholder API using JMeter, Jenkins, and Postman. The objective was to evaluate API response times, concurrency handling, and overall system stability under different loads.
https://github.com/yahya123-hub/api-performance-testing-jsonplaceholder
apitesting jenkins jmeter load-testing performance-testing postman stress-testing
Last synced: 2 months ago
JSON representation
This project focuses on performance testing of the JSONPlaceholder API using JMeter, Jenkins, and Postman. The objective was to evaluate API response times, concurrency handling, and overall system stability under different loads.
- Host: GitHub
- URL: https://github.com/yahya123-hub/api-performance-testing-jsonplaceholder
- Owner: Yahya123-hub
- Created: 2025-01-26T10:14:55.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-10T16:09:57.000Z (12 months ago)
- Last Synced: 2025-03-10T17:25:11.870Z (12 months ago)
- Topics: apitesting, jenkins, jmeter, load-testing, performance-testing, postman, stress-testing
- Language: HTML
- Homepage: https://jsonplaceholder.typicode.com/guide/
- Size: 3.01 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 📌 Overview
This project focuses on **performance testing** of the [JSONPlaceholder API](https://jsonplaceholder.typicode.com/) using **JMeter, Jenkins, and Postman**. The objective was to evaluate API response times, concurrency handling, and overall system stability under different loads.
## 📂 Repository Contents
- **JMeter Test Plan (`jsonplaceholder-jmeter.jmx`)** – The JMeter script defining multiple thread groups for different test scenarios.
- **Postman Collection (`jsonplaceholder-postman.json`)** – API functional test cases before performance testing.
- **Test Reports (`jmeter-report/`)** – Load test results including response time, throughput, and error rate.
- **Jenkins Pipeline (`Jenkinsfile`)** – Automated performance testing setup using Jenkins.
- **Screenshots (`screenshots/`)** – Key insights from test executions.
## 📝 Performance Testing Strategy
- **API Tested**: JSONPlaceholder (Simulated REST API)
- **Test Approach**:
1. **Functional Verification** – Ensured API endpoints were responding correctly using **Postman**.
2. **Load Testing** – Simulated multiple concurrent users making requests.
3. **Stress Testing** – Pushed the API beyond its limits to observe failure points.
4. **Spike Testing** – Sent an extreme number of requests suddenly to test how the API handles traffic spikes.
## 🔄 JMeter Thread Groups & Test Scenarios
We structured the JMeter test plan using **multiple thread groups** to simulate different load conditions:
### **1️⃣ Baseline Performance Test**
- **Thread Group**: Single user sending sequential API requests.
- **Goal**: Establish a baseline response time without load.
### **2️⃣ Concurrent User Load Test**
- **Thread Group**: 50 virtual users.
- **Ramp-up Time**: 10 seconds.
- **Loop Count**: Continuous requests for 5 minutes.
- **Goal**: Measure average response time and throughput under normal load.
### **3️⃣ Stress Test**
- **Thread Group**: 200 virtual users.
- **Ramp-up Time**: 30 seconds.
- **Duration**: 10 minutes.
- **Goal**: Identify breaking points and API failure rate under heavy load.
### **4️⃣ Spike Test**
- **Thread Group**: 500 virtual users.
- **Ramp-up Time**: 5 seconds (sudden spike).
- **Goal**: Observe how the API handles a sudden surge in traffic.
### **5️⃣ Endurance Test**
- **Thread Group**: 100 users.
- **Test Duration**: 1 hour.
- **Goal**: Assess API performance over an extended period.
## ⚙️ Tools & Technologies
- **JMeter**: Designed and executed performance tests.
- **Postman**: Verified API responses before performance testing.
- **Jenkins**: Automated performance test execution via CI/CD pipeline.
- **CSV Data Config**: Used parameterized requests with different test data.
- **Listeners**:
- **Summary Report**: Aggregated test metrics.
- **View Results Tree**: Debugging individual request responses.
- **Graph Results**: Visual representation of API response trends.
## 📊 Key Performance Metrics
- **Response Time** – Average and 90th percentile response time.
- **Throughput** – Requests per second handled by the API.
- **Error Rate** – Percentage of failed requests.
- **CPU & Memory Impact** – Observed system resource usage during high load.
## 🎯 Key Learnings
- Designing structured performance test plans with **multiple thread groups**.
- Configuring **JMeter listeners and timers** for accurate results.
- Automating performance testing using **Jenkins pipelines**.
- Identifying **performance bottlenecks and optimizing API response times**.
## 🚀 How to Use
Clone the repository
Run Postman Tests
Import jsonplaceholder-postman.json and verify API responses.
Run JMeter Tests
Open Apache JMeter and load jsonplaceholder-jmeter.jmx.
Select different thread groups to execute specific load tests.
View real-time results using Graph Results & Summary Report.
Run Automated Tests via Jenkins:
Use the provided Jenkinsfile to integrate JMeter into Jenkins.
Monitor test execution and reports from Jenkins dashboard.
Analyze Performance Reports:
Navigate to jmeter-report/ for detailed test results.






