6. WORKFLOW OF A
BROWSER CALLING A
WEB PAGE
This flow explains how a
request for web page is
sent to the Web server
from a User's browser, and
how a web page is finally
displayed.
6
7. JMETER REPLACING A
BROWSER
Now Apache JMeter comes
into the picture. The
actions taken by the User
are triggered by some HTTP
requests which are recorded
in a JMeter HTTP Request
Sampler for multiple users.
7
8. USER TRANSACTION
IN TERMS OF JMETER
When we add a HTTP Request
Sampler in JMeter Test plan it
stores one Web Page calling
and receiving sequence. We
can call this as a single user
transaction.
8
10. VIEW RESULTS TREE
LISTENER
As JMeter is not exactly a
browser the HTTP Request
Sampler makes all the
received data available for
further analysis. We use
View Tree Listener for
actually visualizing the
received response.
10
11. SUMMARY REPORT
LISTENER
When JMeter simulates multiple users by
making the same call multiple times, in
execution paths that time more
analytical data is available. The
Summary Report Listener can show us
the additional calculated data line
Minimum time and Maximum time taken
to receive the response. It also
calculates the average time taken using
all the results together.
11
14. THREAD GROUP
Now we will add our first element in the
window. We will add one Thread Group,
which is placeholder for all other
elements like Samplers, Controllers,
Listeners. In JMeter all the node
elements are added by using the
context menu. You have to right click
the element where you want to add a
child element node. Then choose the
appropriate option to add.
14
15. THREAD GROUP
SETTINGS
The Thread Group represents
one set of actions performed by
User. We have kept the setting
of the thread group as single
thread (that means one user
only) and loop for 1 time (that
means run only one time)
15
16. NAMING A THREAD
GROUP
Like we changed the name of
Test Plan let us also change the
name of Thread Group. For us
this is the element which
represents multiple users. So
let us name it "Users". For us
this element means Users
visiting the Google Home Page.
16
17. HTTP REQUEST
SAMPLER
Now we have to add one Sampler
in our Thread Group (Users). As
done earlier for adding Thread
group, this time we will open the
context menu of the Thread Group
(Users) node by right clicking and
we will add HTTP Request Sampler
by choosing Add > Sampler >
HTTP request option.
17
18. HTTP REQUEST
CONFIGURATION
Name: we will change the name to
reflect the action what we want to
achieve
Server Name or IP: here we have to
type the web server name
Protocol: we will keep this blank That
will mean we want HTTP as the
protocol
Path: we will type path as / (slash)
This means we want the root page of
the server
18
19. ADDING VIEW
RESULTS TREE
LISTENER
After adding the HTTP Request
Sampler we will need one
Listener. Let us add View
Results Tree Listener under the
Thread Group (User) node. This
will ensure that the results of
the Sampler will be available to
view in this Listener node
element.
19
20. EXECUTING A TEST
PLAN
With this much of setup, We
will execute the test plan
using Run > Start option.
This is similar to like a user
visiting a web page through
browser, only here we are
doing that through JMeter
sampler.
20
21. VIEWING THE
RESULTS
Green Colour represents JMeter
was successful in fetching the
web page at the given URL just
like a browser. It has stored all
the headers and the response
sent by the web server and
ready to show us the result in
many ways.
21
22. VRT-SAMPLER RESULT
TAB
The first tab is Sampler Results. It
shows JMeter data as well as data
returned by the web server. Usually
browsers hide this data from us as it is
not related to showing the web
page. This data is utilized internally by
the browser, for example when there is
a Response Code: 404 then the browser
shows a page not found error page, and
when the Response Code is 200 the
browser shows the received web page
HTML.
22
23. VRT-REQUEST TAB
The second tab is Request,
where all the data which
was sent to the web server
as part of the request is
shown.
23
24. VRT-RESPONSE DATA
TAB
The last tab is Response
data. In this tab the listener
shows the data received from
server as it is in text format. It
also have facility to show the
data in XML, HTML formats
. This may look different than
the page actually seen in the
browser.
24
25. VIEWING RESPONSE
TIMES
To visualize the results, a better
aggregating listener will be
required so we will add Summary
Report Listener in the Thread
Group node. The summary report
shows values about the
measurement JMeter has done
while calling the same page as if
many users are calling the page.
25
26. ADDING USERS TO
THE TEST
JMeter's real strength is in
sending the same request
like many users are sending
it. To test the web servers
with multiple users we will
have to change the Thread
Group (Users) settings.
26
27. ATTACHMENTS
Having seen the basics of
Jmeter, the attached PDF
provided by Jmeter, details
the steps to record a script
in Jmeter.
27