8/8/2019 Jmeter Performance Testing Your Webapp 1203622239433273 3
1/12
JMeter(http://jakarta.apache.org/jmeter/)
A tool for performance testing your webapp
Amit Solankihttp://[email protected]
8/8/2019 Jmeter Performance Testing Your Webapp 1203622239433273 3
2/12
Testing - Performance/Load/Stress
Performance testing how fast an app performs under a particular workload validation, verication of quality attributes (scalability, reliability, resource
usage) demonstrates that the system meets performance criteria Load Testing
modeling the expected usage by simulating multiple users accessing the webservices concurrently
raised beyond normal usage - stress testing
Stress Testing determination of stability of an application tries to break the app by overwhelming its resources
8/8/2019 Jmeter Performance Testing Your Webapp 1203622239433273 3
3/12
Before starting
What is our anticipated average number of users (normal load) ? What is our anticipated peak number of users ? When is a good time to load-test our application (i.e. off-hours or week-ends),
bearing in mind that this may very well crash one or more of our servers ?
What is the testing intended to achieve? Sequential
functional (low-volume) benchmark (the average number of users)
load-test (the maximum number of users) test destructively (what is our hard limit?)
8/8/2019 Jmeter Performance Testing Your Webapp 1203622239433273 3
4/12
JMeter - Introduction
Features 100% pure java, open source desktop application originally developed by Stefano Mazzocchi designed for functional/load/performance/stress testing Extensible write your own test Simulate heavy load (application, server and network) Gives instant visual feedback distributed testing various protocols - HTTP, FTP, JDBC, JMS, LDAP, SOAP multi-platform Full multithreading framework Caching and ofine analysis/replaying of test results.
8/8/2019 Jmeter Performance Testing Your Webapp 1203622239433273 3
5/12
Application Overview
GUI, command line interface Tests can be run and analyzed interactively, or run in batch
mode and analyzed ofine
Test plans consist of Thread groups : organize threads of execution Samplers : sends requests to a server Logical controllers : control ow of test plan (loops, conditionals,
ordering, etc.)
Listeners : record, summarize and display record and response data Timers : introduce delays in test plan
Assertions : assert facts about responses, for functional testing Conguration elements Pre-processors and post-processors
8/8/2019 Jmeter Performance Testing Your Webapp 1203622239433273 3
6/12
Testing Process
Plan TestCreate Thread
GroupCreate Test
Script Run Test Plan Analyze Result
Thread GroupScheduler
SamplersTimers
ListenersTest Plan
8/8/2019 Jmeter Performance Testing Your Webapp 1203622239433273 3
7/12
Elements of test planThread group
Samplers
Logic Controllers
Listeners
Timers
Assertions
Pre-Processor Elements
Post-Processor Elements
Conguration Elements
8/8/2019 Jmeter Performance Testing Your Webapp 1203622239433273 3
8/12
Demo
8/8/2019 Jmeter Performance Testing Your Webapp 1203622239433273 3
9/12
Distributed Testing
jmeter -server192.168.1.6
jmeter192.168.1.2
jmeter -server192.168.1.7
jmeter -server192.168.1.8
jmeter -server192.168.1.9
jmeter -server192.168.1.10
jmeter -server192.168.1.11
8/8/2019 Jmeter Performance Testing Your Webapp 1203622239433273 3
10/12
Distributed Testing (contd...)
Check : -
rewalls turned off jmeter & jmeter -servers on same subnet jmeter can access all jmeter -servers same version of jmeter on all systems
8/8/2019 Jmeter Performance Testing Your Webapp 1203622239433273 3
11/12
Drawbacks
Complex terminology
Manual distributed execution Graphic representation quite confusing Difcult to build for beginners
8/8/2019 Jmeter Performance Testing Your Webapp 1203622239433273 3
12/12
Thank You!!!