introduction to jmeter
DESCRIPTION
Introduction to jmeterTRANSCRIPT
![Page 2: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/2.jpg)
● Performance testing
● What is JMeter
● JMeter basic elements
● Jmeter Plugins
● Example
Agenda
![Page 3: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/3.jpg)
● Performance testing is in general testing performed to
determine how a system performs in terms of responsiveness
and stability under a particular workload.
Performance Testing
![Page 4: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/4.jpg)
● Load Testing○ Load testing is the simplest form of performance testing. A load test
is usually conducted to understand the behaviour of the system under
a specific expected load.
● Stress testing○ Stress testing is normally used to understand the upper limits of
capacity within the system. This kind of test is done to determine the
system's robustness in terms of extreme load
Performance Testing
![Page 5: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/5.jpg)
● Performance Goals○ Concurrency/throughput
■ Transactions per second the application under test can
handle
○ Server response time
■ Amount of time the application under test takes to
process a request after it has received.
Performance Testing
![Page 6: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/6.jpg)
● Apache JMeter is an Apache project that can be used as a load
testing tool for analyzing and measuring the performance of a
variety of services, with a focus on web applications.
What is JMeter
![Page 7: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/7.jpg)
● Test Plan
● Thread Group
● Sampler
● Assertion
● Listener
● Logic Controller
● Timer
● Config Element
● Pre-Processor / Post-Processor
JMeter basic elements
![Page 8: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/8.jpg)
JMeter basic elements
![Page 9: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/9.jpg)
A test plan describes a series of steps JMeter will
execute when run. A complete test plan will consist
of one or more Thread Groups, logic conrollers,
sample generating controllers, listeners, timers,
assertions, and configuration elements.
Test Plan
![Page 10: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/10.jpg)
Thread group elements are the beginning points of
any test plan. All controllers and samplers must be
under a thread group.
Thread Group
![Page 11: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/11.jpg)
Samplers tell JMeter to send requests to a server and
wait for a response. They are processed in the order
they appear in the tree.
Sampler
![Page 12: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/12.jpg)
Assertions allow you to assert facts about responses
received from the server being tested. Using an
assertion, you can essentially "test" that your
application is returning the results you expect it to.
Assertion
![Page 13: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/13.jpg)
Listeners provide access to the information JMeter
gathers about the test cases while JMeter runs.
Listener
![Page 14: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/14.jpg)
Logic Controllers let you customize the logic that
JMeter uses to decide when to send requests. Logic
Controllers can change the order of requests coming
from their child elements. They can modify the
requests themselves, cause JMeter to repeat
requests, etc.
Logic Controller
![Page 15: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/15.jpg)
The timer will cause JMeter to delay a certain
amount of time before each sampler which is in its
scope .
Timer
![Page 16: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/16.jpg)
A configuration element works closely with a
Sampler. Although it does not send requests (except
for HTTP Proxy Server ), it can add to or modify
requests.
Config Element
![Page 17: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/17.jpg)
● A Pre-Processor executes some action prior to a
Sampler Request being made
● A Post-Processor executes some action after a
Sampler Request has been made
Pre-Processor / Post-Processor
![Page 18: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/18.jpg)
1. Config Element
2. Pre-Processor
3. Timer
4. Sampler
5. Post-Processor
6. Assertion
7. Listener
Execution Order
![Page 19: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/19.jpg)
● A plugin of Jmeter, lots of great features○ Stepping Thread Group
○ PerfMon Metrics Collector
○ Response Times vs Threads
○ Response Times Distribution
○ Parameterized Controller
Jmeter Plugins
![Page 20: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/20.jpg)
● 30 login user threads○ Ramp up: Start 3 threads every 10 seconds○ Hold for 300 seconds○ Stop 2 threads every 5 seconds
● 10 guest threads○ Ramp up: Start 1 thread every 10 seconds○ Hold for 300 seconds○ Stop 1 thread every 5 seconds
Example
![Page 21: Introduction to jmeter](https://reader034.vdocuments.net/reader034/viewer/2022052410/554fb7dcb4c90542018b45b6/html5/thumbnails/21.jpg)
Example
Target Page Sample Average response time Throughtput
Guest Start page 4796 149 10
Start page 10892 247 23