Apache JMeter is an Apache project that can be used as a load testing tool for analyzing and measuring the performance of a wide range of services, with a particular emphasis on web applications
2. ABOUT ME
Galih Lasahido
galih.lasahido@gmail.com
An enthusiastic Java developer that you can rely on
•11+ years of experience in programming
•8 years of experience in Banking payment
•String knowledge in Java and PHP
•ISO 8583 payment expert
•JPos-ee contributor
4. PERFORMANCE TESTING
Performance testing is in common testing performed to decide how a framework
performs in terms of responsiveness and steadiness beneath a specific workload.
Load Testing
Load testing is the simplest shape of Performance testing. A load test is as a rule
conducted to get it the behaviors of the framework beneath a particular anticipated
stack.
5. PERFORMANCE TESTING
Stress testing
Stress testing is typically used to determine the system's upper limits of capacity. This
type of test is performed to determine the system's robustness under extreme load.
Bottle neck
A bottleneck is a feature in which the overall performance or capacity of a system is
constrained by a single or limited number of components or resources.
Your web application may be made up of several modules that are used to process
requests. If one of them has a technical limitation, the overall system performance
suffers.
6. PERFORMANCE TESTING
Volume testing
Volume testing is performed against the application's efficiency. A massive amount of
data is processed through the application (which is being tested) in order to test the
system's extreme limitations.
Endurance Testing
This type of testing is used to ensure that the system can withstand a large number of
transactions over a long period of time.
The test will be run with a defined set of concurrent users for an extended period of
time, say 5 to 10 hours or 2 to 3 days.
7. PERFORMANCE GOALS
Spike Testing
Spike testing involves abruptly increasing the number of users' load by a large amount
and observing the system's behavior. The goal is to determine whether or not the
system will degrade in performance, fail, or be able to handle dramatic changes in
load.
10. WHAT IS JMETER
Apache JMeter is an Apache project that can be used as a load testing tool for
analyzing and measuring the performance of a wide range of services, with a
particular emphasis on web applications.
Can load and performance test many different server types:
•Web - HTTP, HTTPS
•SOAP
•Database via JDBC
•LDAP
•JMS
•etc
13. TEST PLAN
A test plan describes a series of steps that JMeter
will take when it is run. A comprehensive test
strategy will consist of one or more Thread Groups,
logic controllers, sample generating controllers,
listeners, timers, assertions, and configuration
elements.
14. THREAD GROUP
Thread group elements serve as
the starting point for any test
plan. A thread group must be
assigned to all controllers and
samplers.
15. SAMPLER
JMeter is told by samplers to
send requests to a server and
wait for a response. They are
handled in the order in which
they appear in the tree.
16. ASSERTION
Assertions allow you to assert
facts about responses from the
server under test. Using an
assertion, you can effectively
"test" that your application is
returning the expected results.
18. LOGIC CONTROLLER
Logic Controllers allow you to
modify the logic that JMeter
employs to determine when to
send requests. Logic Controllers
have the ability to reorder
requests from their child elements.
They can change the requests
themselves, make JMeter repeat
requests, and so on.
JMeter provides several Logic
Controller, which are as follows:
Critical Section
Controller
ForEach Controller
If Controller
Include Controller
Interleave Controller
Loop Controller
Module controller
Once Only Controller
Random Controller
Random Order
Controller
Recording Controller
Runtime Controller
Simple Controller
Switch Controller
Throughput
Controller!
Transaction
Controller
While Controller
19. INTERLEAVE
CONTROLLER
Interleave Controller will select only one samplers/requests stored in it,
to run in each loop of the thread. It will execute the samplers
sequentially.
You can give descriptive name for the controller (optional)
If checkbox is selected, the interleave controller will consider sub-controllers
as single request elements and permit only one request per controller at a
time (optional)
Let’s consider an example of Interleave Controller, where Thread
Group contains “Number of Threads” to “1”, “Loop Count” to 5, and a
total of “4” Samplers (Http requests).
Total 1 * 5 * 4 = “20” requests will be sent to web server under test
without using any Logic Controller. You can see details in the below
figure:
20. INTERLEAVE
CONTROLLER
You can see “4” Requests/Samplers under Interleave Controller node on the
left panel.
Only 5 Http Requests are being sent to the web server (one request for
each loop)
21. LOOP CONTROLLER
For Example, Thread Group loop count is set to “2”, Loop Controller loop
count is set to “2”, and “3” requests are present under Loop Controller
node, then JMeter will send a total of “30” Http Requests to the web server
under test.
Total Requests (12) = Thread Group loop count (2) * Loop Controller
loop count (2) * Number of Requests inside Loop Container (3)
Let’s compare the requests sent with or without Loop Controller:
Without Loop Controller, “6” requests are sent to the web server:
22. LOOP CONTROLLER
After adding Loop Controller with Loop Count to “2”, a total of “12”
Http requests are sent to the web server.
23. MODULE CONTROLLER
Module controller adds modularity to the JMeter Test Plan. Normally we
construct test plan consists of small units of functionality like Login, Add
Product, Logout. The functionality can be stored inside Controllers as
modules e.g. “Test Fragment” can be used to store each module inside it.
In order to run modules in other thread, so when the test fragment is
change, you don’t need to change every thread that are using it.
26. RANDOM CONTROLLER
Random Controller is similar to “Interleave Controller” except that it
makes samplers/requests to run in random order in each loop. For
Example, you have defined “3” Dummy requests under “Random
Controller”, then these requests will be sent based on the number of
thread in Thread Group in random sampler and will be decided on rum-
time.
27. RANDOM ORDER CONTROLLER
Random Order Controller is similar to “Interleave Controller” except that
it makes samplers/requests to run in random order in each loop. For
Example, you have defined “3” Dummy requests under “Random
Controller”, then these requests will be sent in random order and their
order of execution will be decided on rum-time.
28. SIMPLE CONTROLLER
Simple Controller helps in organizing and storing the Samplers and other
Logic Controllers. It doesn’t offer any other functionality like other
controllers.
29. RUNTIME CONTROLLER
Runtime Controller controls the execution of its samplers/requests for the
given time. For example, if you have specified Runtime(seconds) to “20”,
JMeter will run your test for 20 seconds only.
30. RECORDING CONTROLLER
Recording Controller is a place holder where proxy server can save
recorded requests. It has no effects on test execution. As you can see in
the following figure:
31. TIMER
JMeter will delay a certain
amount of time before each
sampler in its scope as a result
of the timer.
32. CONFIG ELEMENT
A configuration element
collaborates with a Sampler.
Although it does not send
requests (with the exception of
HTTP Proxy Server), it can add
to or modify existing ones.
38. All report generator properties can be found in
file reportgenerator.properties. To customize these
properties, you should copy them in user.properties file and
modify them.
Configuring Dashboard
Generation
39. Make a report folder in JMETER_HOME/bin
JMETER_HOME/bin/jmeter -n -t templates/iso8583.jmx -l
report/log -e -o report/
Using Command
45. INSTALLING
PLUGINS
The easiest way to get the plugins is to install Plugins Manager. Then you'll be
able to install any other plugins just by clicking a checkbox.
Download plugins-manager.jar and put it
into JMETER_HOME/lib/ext directory, then restart JMeter.
55. RUN PROXY SAMPLER
Get you mobile phone and
install CA Root Jmeter file,
the file it self located in
JMETER_HOME/bin/Apache
JMeterTemporaryRootCA.crt
64. ISO 8583 TEST PLAN
Checking “Run Thread
Groups consecutively” will
result a serial request per-
thread, while unchecking can
result a parallel request
thread
73. STRESS TEST
By Using the Synchronizing Timer, and set the
Thread to a certain concurrent request that you
want, the request will hold until all thread are ready
75. MASTER: THE SYSTEM IS RUNNING A METER GUI, WHICH IS USED TO
CONTROL THE TEST.
SLAVE: THE SYSTEM RUNNING JMETER-SERVER, WHICH ACCEPTS
RECOMMENDATIONS FROM THE GUI AND SENDS THEM TO THE TARGET
SYSTEM.
TARGET: THE LOAD TEST WAS PLANNED BY THE WEB SERVER.
Configuration:
1. Copy same version of Meter to
different computer.
2. Add remote node IP in
jmeter.properties file.
3. Run Meter on remote machine
using
JMETER_HOME/bin/jmeter-
server (in command prompt)
4. Start Meter GUI in host machine.
5. Select any test plan.
6. Go to Run >> Remote Start >>
Remote IP Address.
76. EDIT THE PROPERTIES FILE ON THE CONTROLLING JMETER MACHINE.
IN JMETER_HOME/BIN/JMETER.PROPERTIES, FIND THE PROPERTY NAMED
"REMOTE_HOSTS" AND ADD THE VALUE OF YOUR RUNNING JMETER SERVER'S
IP ADDRESS. MULTIPLE SUCH SERVERS CAN BE ADDED, COMMA-DELIMITED.