working with jakarta jemeter
TRANSCRIPT
-
8/7/2019 WORKING WITH JAKARTA JEMETER
1/9
WORKING WITH JAKARTA JEMETER
Working with JMeter
TEST PLAN (consider as test
suite)
All work performed in Jmeter start in Test Plan
Each test plan has one or more than 1 Thread Group( Each thread group can have
number of threads, each user shows a virtual user)
Important :: We can consider test plan as a Test Suite
We can consider tread Group as Test Case
Thread Group (Consider as test
case)
Each thread group can be considered as Test case.
We can apply number of threads on each thread group, each thread represents 1
virtual user.
Thread group can contains
** components or steps that can be added in thread group.
A-> Listeners :-- provide access to the information gathered by Jmeter while
test case execution.
So we can say that it is for display results.
B-> Controllers :--
a-> Sampler : Tells jmeter to send request to the server.
b-> Logic Controller : Let us make logic in scripting.
-
8/7/2019 WORKING WITH JAKARTA JEMETER
2/9
C-> Timers : - It is used to make delays between different requests.
D-> Assertions :- Assertions are used to make validations on the resultsreturned by server.
E-> Configuration Element : Work closely with samplers, can be used to add or
modify requests.
-
8/7/2019 WORKING WITH JAKARTA JEMETER
3/9
HIERARCHY USED IN JMETER
< TEST PLAN >
(Each Test plan can have multiple thread groups)
< THREAD GROUP>
(Each thread group can have any of the following element)
[ LISTENER ]
[ SAMPLERS / LOGIC CONROLLERS ]
[ TIMERS ]
[ ASSERTIONS ]
[ CONFIGURATION ELEMENTS ]
JMETER WINDOW
Jmeter window has two parts
TEST PLAN WORKB
Test plan have series of steps that Workbench work as a
temporary workspace
Jmeter will execute one the execution to store test elements.
Of test plan starts. Elements in the workbench
does not save
-
8/7/2019 WORKING WITH JAKARTA JEMETER
4/9
With test plan but that can
be saved independently.
WE ARE GOOD FOR THE BASICS NOW. NOW WE WILL START
ACTUAL WORKING
PRE REQUISIT BEFORE INSTALLATION
We must have JVM version more than 1.5
JMeter Installation
Download Jmeter from Jakarta website.
We have 2 options to download Bin file or Source File
Bin File is ready to work, just download it and unzip
Source File is used when we want to upgrade jmeter.
For installation
Unzip Folder.
Open Folder
Go to Bin
Double click on Jmeter.bat file.
WORKING WITH TEST PLAN
Test Plan Control Panel
-
8/7/2019 WORKING WITH JAKARTA JEMETER
5/9
Here in Test Plan control panel, we have few properties to set
1-> User defined Variables :-
Here we defined variables that can be used throughout the test script.
Like we can create variable server with some value, in complete script we can usevalue of that variable by ${server}
2-> Run thread group consecutively.
This option mainly work when we have multiple thread group in a test plan
If we make check here it means only 1 thread group will execute at a time
otherwise all thread groups will work in parallel.
3-> Functional test Mode
It will save data which is returned by server and save to the file which is set in
listener.
-
8/7/2019 WORKING WITH JAKARTA JEMETER
6/9
We can use this option when we want to check that server is returning correct
response but it will reduce performance.
Each Test Plan have at least 1 thread group
We can set many things into thread group
Number of Threads :- here we can set number of threads means number of virtual
users that will run for this tread group(test case)
Ramp up Period :- Total time in which all threads will apply to that test case
Eg. If we have ramp up time 60 sec and threads are 10, so 60/10, in every 6
second a thread will
initiate.
Loop count :- Number of time this test will repeat.
Scheduler : Scheduler allow user to ser start and end time of execution.
Duration : For how long this tread group will execute.
-
8/7/2019 WORKING WITH JAKARTA JEMETER
7/9
If we enter end time in scheduler and set duration as well, duration
will override endtime.
Delay : how long it will take to start first thread, it we set delay value it will
override start time.
ELEMENTS OF TEST PLAN (UNDER THREAD GROUP)
CONTROLLERS :
Jmeter has two types of Controllers
1-> Sampler 2-> Login Controllers
1-> Sampler
It allow jmeter to send different type of requests to server.
-
8/7/2019 WORKING WITH JAKARTA JEMETER
8/9
We have selected HTTP sampler, now we can see Sampler Control panel, we can
handle sampler request either by here or by adding configuration element.
We can set IP or server name with port
Logic Controllers
Logic controllers are mainly used to control executions of different controllers.
We can add as many samplers as we want under logic controller, then login
controller will handle them.
-
8/7/2019 WORKING WITH JAKARTA JEMETER
9/9
Listener
Listener let us view the result of sampler in the form of tables, graph , log file etc.
Listeners are added to samplers to collect the data returned in form of
response of samplers.
Assertions
Assertions are used to make validations on response which we get from server.
Assertions are added as the child element of samplers.
Configuration Element :
Configuration elements are used to create defaults and variable that will be used in
samplers.
Configuration elements are executed before any sampler in that particularscope.