What is Load Testing?
Load testing is a type of performance testing that simulates real-world traffic to a web application. It helps identify how a system behaves under expected user loads and helps uncover potential performance bottlenecks.
Apache JMeter is one of the most widely used tools for load testing. In this guide, we’ll cover step-by-step instructions on how to conduct load testing using JMeter for both authenticated and non-authenticated users.
📦 Prerequisites
- Install Apache JMeter
- A running web application (we’ll use
https://dummyapi.com
)
🔹 Test Scenario 1: Load Testing Without Authentication
Step 1: Create a Thread Group
- Open JMeter
- Right-click on Test Plan > Add > Threads (Users) > Thread Group
- Configure:
- Number of Threads (Users):
10
(increase gradually) - Ramp-Up Period:
5
- Loop Count:
1
- Number of Threads (Users):


Step 2: Add HTTP Request
- Right-click on Thread Group > Add > Sampler > HTTP Request
- Configure:
- Method:
GET
- Protocol:
https
- Server Name:
dummyapi.com
- Path:
/public
- Check: Use KeepAlive, Follow Redirects
- Method:


Step 3: Add HTTP Header Manager (Optional)
- Right-click on HTTP Request > Add > Config Element > HTTP Header Manager
- Add:
- Name:
Content-Type
, Value:application/json
- Name:

Step 4: Add Listener
- Right-click on Thread Group > Add > Listener > View Results Tree
- Also add Summary Report for statistical output


Step 5: Run the Test
- Click the Start button ▶️ on the toolbar
- View Results in Tree and Summary Report
🔒 Test Scenario 2: Load Testing With Authentication
Step 1: Login Request
- Right-click on Thread Group > Add > Sampler > HTTP Request
- Configure:
- Method:
POST
- Protocol:
https
- Server Name:
dummyapi.com
- Path:
/api/login/
- Body Data:
- Method:
{
"username": "admin@dummy.com",
"password": "12345678"
}
- Add HTTP Header Manager with:
- Content-Type:
application/json
- Content-Type:
Step 2: Extract Auth Token (Using JSON Extractor)
- Right-click on login HTTP request > Add > Post Processors > JSON Extractor
- Add:
- Name of Variable:
access_token
- JSON Path Expression:
$.access
- Name of Variable:
Step 3: Authenticated Request
- Add another HTTP Request after login
- Set:
- Method:
GET
- Path:
/user/dashboard/
- Method:
- Add HTTP Header Manager:
- Authorization:
Bearer ${access_token}
- Content-Type:
application/json
- Authorization:
Step 4: Add Listener
- As before, add View Results Tree and Summary Report
📊 Running the Load Test
- Gradually increase users: 10, 20, 30, … up to 100
- Monitor errors and latency
- Validate application performance under load
✅ Tips for Real-World Testing
- Use realistic data sets with CSV Data Set Config
- Simulate think time with Timers
- Add assertions to validate correctness
- Run tests from CI pipelines (Jenkins or GitHub Actions)
📈 Monitoring Performance
Integrate with Prometheus and Grafana for real-time server metrics like:
- CPU, Memory, Disk Usage
- Active Threads
- HTTP Response Times
Conclusion: Load testing with JMeter is critical for understanding how your application behaves under stress. By testing both authenticated and non-authenticated flows, you ensure a reliable and scalable user experience.
Let me know if you want a downloadable version or a formatted blog version for Medium or WordPress.