You are on page 1of 46

JMETER PRACTICE DOCUMENTATION

STEPS TO CREATE TEST IN JMETER 3

AUTHENTICATION AND AUTHORIZATION IN JMETER 3

HOW TO RUN LOAD TEST FROM CLI WITH JMETER 8

PARAMETERIZATION IN JMETER 9

HOW TO USE ASSERTION IN JMETER 10

HOW TO DEBUG IN JMETER USING LISTENER,LOG VIEWER AND DEBUG SAMPLER 10

HOW TO HANDLE DYNAMIC VALUES(CORRELATION) IN JMETER 13

JSON EXTRACTOR POST PROCESSOR 15

HOW TO SEND MAIL USING JMETER 19

HOW TO USE TIMER IN JMETER 21

HOW TO USE LOGIC CONTROLLER IN JMETER 23

HOW TO DO API PERFORMANCE TESTING 29

FTP SERVER TESTING 33

FUNCTIONS AND VARIABLES IN JMETER 34

HOW TO MONITOR SERVER HEALTH USING JMETER(PERFMON) 35

HOW TO DO REMOTE DISTRIBUTED TESTING 38

BEANSHELL SCRIPTING 40

JMETER INTERVIEW QUESTIONS 46


STEPS TO CREATE TEST IN JMETER
JMeter Certification Quiz- Online MCQ Test

1. Launch Jmeter from the Jmeter bin folder (Test plan is shown)
a. Test plan is the container of all things needed in a performance test
2. Right click on the Test plan
3. Click on the add button
4. Select Threads and choose thread group from the list
5. Right click on the thread group
6. Click on the add button
7. Choose sampler and select HTTP REQUEST
Setting up HTTP request: number of threads = number of users
Ramp up period = Time for each user to wait before running (i.e ramp up period/number of
threads)
Loop count = no of iteration each user should go
8. Right Click on the Thread group
9. Click on the add button
10. Click on Listener and select Listener of choice to display your result
11. Run the test

The following are usually present in a JMETER Listener


#Samples -- the total amount of requests to our server;
Average, Min, Max -- the time it takes to process one request. The numbers
are shown in milliseconds;
Error % -- the percentage of mistakes with errors;
Throughput -- the number of processed requests in a given period of time.

AUTHENTICATION AND AUTHORIZATION IN JMETER


Some applications(Web or mobile) require the user to authenticate before using the application. There are
two ways to handle Basic Authentication in Jmeter which are:
HTTP Authorization Manager
HTTP Header Manager with Beanshell Preprocessor
USING HTTP AUTHORIZATION MANAGER
1. Setup Test plan(add thread group, HTTP Request, Listener)
2. Add HTTP Authorization Manager to the Thread group(Add>>Config element>> HTTP
Authorization Manager)

3. Setup the HTTP Authorization Manager by following the steps below:


i. Click on Add button
ii. Enter URL
iii. Enter Username
iv. Enter password
v. Select Prefered Mechanism from the Mechanism dropdown.
vi. Domain and Realm can be left empty.

4. Run the Test


USING HEADER MANAGER WITH BEANSHELL PREPROCESSOR
HTTP Header Manager is a config element which add headers accepts name as Authorization, and the
value would be added as Basic Base64Encode which JMeter doesn’t provide, then beanshell preprocessor
is used to create the script to encode user:password
1. Setup Test plan(add thread group, HTTP Request, Listener)
2. Add Beanshell Preprocessor to the HTTP Request(Add>>Preprocessors>> Beanshell
PreProcessor)

Write in the following code in the beanshell script editor:


import org.apache.commons.codec.binary.Base64;
byte[] encoddUsernamePassword = Base64.encodeBase64("user:passwd".getBytes());
vars.put("auth",new String(encoddUsernamePassword));

3. Add HTTP Header Manager to the HTTP Request(Add>>Config element>> HTTP Header
Manager)
Setup the Authorization Header Manger as follows:
Click the Add button
Name: Authorization
Value: Basic ${auth}

4. Run the test

HOW TO RUN LOAD TEST FROM CLI WITH JMETER


Navigate to the bin folder of Jmeter in cmd/terminal
Then enter the following command: jmeter -n -t <jmeter test file location> -l <tes log file>
-n: to run test in non GUI MODE
-t: refer to test to be executed location
-l: location where test result will be saved
Note: While typing command don’t use <> in the terminal
Note: jmeter -h command is used to view all possible commands in jmeter
HOW TO GENERATE HTML DASHBOARD REPORT IN JMETER
It is better to run test from CLI mode and generate the reports.
The steps to execute and generate the steps are as follows:
Navigate to the bin folder from the terminal/cmd
Then enter the following command:
Window: jmeter -n -t <jmeter test file location> -l <test log file> -e -o
<html report location>
For mac: sh jmeter -n -t <jmeter test file location> -l <test log file> -e -o
<html report location>
Note: -e : to create html dashboard report
-o : location to create html dashboard report.
Location of testfile to be tested on mac should be in jmeter bin folder
HOW TO GENERATE HTML REPORT FROM SAVE LOG FILE
1. Launch command line
2. Direct to the bin folder
3. Enter command below in command line
Jmeter -g <log file path> -o <output saving path>
HOW TO CHANGE TOLERANCE & FRUSTRATION THRESHOLD
1. Open Jmeter bin folder
2. Find User.properties file
3. Open the file mentioned in step 2 above
4. Search(cmd+f or ctrl+f) for threshold
5. Change to preferred value
HOW TO CHANGE REPORT GENERATION VIEW
1. Open Jmeter bin folder
2. Search for reportgenerator.properties
3. Tweak to meet preferred use
Note:Dashboard generation uses JMeter properties to customize the report. Some properties are used for
general settings and others are used for a particular graph configuration or exporter configuration. All
report generator properties can be found in file reportgenerator.properties. To customize these properties,
you should copy them in the user.properties file and modify them.Read more

PARAMETERIZATION IN JMETER
Parameterization[ Data driven test] is an execution strategy, which allows us to run a test case
automatically, multiple times with different input values.
Steps to parameterize in jmeter
1. Put test data in csv file
2. Configure Jmeter to read the data from CSV file
Note: parameterization is used while searching.
1. Create CSV file which would be used as data source
2. Right click on the HTTP request which the data source would be used
3. Select Add
4. Select Config element and select CSV DATA Set config from the config element section
5. Setting up the CSV DATA Set config
Filename: contains the path to the CSV data file
Set the hardcoded name to be searched to the title in the csv file with a dollar sign before
it ${title in csv file}
Note: Ensure title in csv file is in curly braces
All place that contain the hardcoded value like the path should be change to the title of
csv file

HOW TO USE ASSERTION IN JMETER


Assertions are used in jmeter to validate our responses whether we are getting the correct response or not.
This is a method which involves using pass or fail comments to classify tests in Jmeter
How to add Assertions in Jmeter
1. Right click on the Http request to be used with Assertion
2. Select Add
3. Select Assertions (Select type of assertion needed. In this Response Assertion was used).
4. Setting up the Assertion(Response Assertion was used)
Apply to: Section which user wants the assertion to be applicable to e.g main sample and
sub samples, main sample only, sub samples only, Jmeter Variable to use(Requires input)
Field to Test: What to use Assertion for in the test.e.g text response, request header,
request data, response code, response message e.t.c
Pattern Matching rules: Used to set sequence of word which will be used during
Assertion execution e.g not match,not contain, contain, matches e.t.c
Patterns to test: Section where text to check for by Assertion in the test is entered
Save the Assertion and go to run the test.

HOW TO DEBUG IN JMETER USING LISTENER,LOG VIEWER


AND DEBUG SAMPLER
USING LISTENER:
Use of Listener sampler datas to view result and track errors e.g. response data, request,
response body,response header e.t.c
Use of Regular Expression Tester (RegExp Tester) in the listener view format:
STEPS:
Select ReqExp Tester(used for extracting info from app) in the result
view format of the listener (Used to get url from page in this example)
It displays a regular expression textbox
Enter a href= “(.+?)” into the box and click test.
USING LOG VIEWER:
Steps:
Click on the Options button at the Taskbar
Select log viewer (To display logs of the execution)
USING DEBUG:
Click on the Options button at the Taskbar
Select log Level
Select Debug
USING DEBUG SAMPLER:
Steps:
Right click on the Thread group
Click on the Add button (Shows list of Available add-ons )
Select Sampler (Shows list of Available add-ons )
Select Debug sampler
HOW TO HANDLE DYNAMIC VALUES(CORRELATION) IN
JMETER
Dynamic Values: are values which are generated in the response and are always changing during every
runtime of the request.
STEPS TO USE DYNAMIC VALUE
1. Capture the Dynamic Value
2. Store the Dynamic Value in a variable
3. Use the variable in another request
Regular expression extractor is used in Jmeter for extracting dynamic values from Response(s). Using the
Regular Expression requires the need of regular Expression. The Regular expression is set of characters
that define a search pattern which helps to catch the value needed.

HOW TO USE REGULAR EXPRESSION EXTRACTOR


1. Right click on the request which dynamic value will be in it’s response
2. Click on the Add button
3. Select post_processors > Regular Expression extractor
Apply to: is to know which section of response should the search be applied to.
Field to check: is the aspect of the response that is to be checked
Name of created variable: name to be given or variable name that should be saved by jmeter for the
extracted variable values.
Regular Expression: set of character that define the search parameters in the response
THIS IS MY HOUSE FRIEND --- Assuming we need a regular expression for the
house field
THIS IS MY (.?) FRIEND ---- Regular Expression
Template: incase where the regular expression used has two(2) encoded value “(.?)” as shown in the
regular expression. Template is used to identify / specify the exact one to use. The format to enter in the
template field is $i$ where i is a numerical value.
$1$: stands for 1st value while $2$: stands for 2nd value
Match No: is used to specify the preferred choice when there is more than one match of the regular
expression found in the check. 0 - random(jmeter picks random value), 1- jmeter picks 1st value, 2 -
jmeter picks second value.
Default: what to show if the value checked for doesn’t exist or isn’t seen.

JSON EXTRACTOR POST PROCESSOR


Used to extract data from JSON response. Stores the extracted data from JSON response in a variable.
Variable(s) can be used in subsequent request(s).
HOW TO USE THE JSON EXTRACTOR
1. Setup Test plan(add thread group, HTTP request and listener)
2. Right click on the preferred HTTP request to add JSON Extractor
3. Setup JSON Extractor.
Names of created variables: Is the name/variable the intended extract is to be saved.
JSON Path Expression: is used to identify the particular expression to be extracted from the
request. There are two types of request and how they are represented which is the first level and
second level.

Type Descrition Rep in JMeter

First Level Is the JSON values that are not nested in $.name e.g $.id
other value(s)

Second Level JSON values that are nested in other $..name e.g $..id
value(s)

Match No. is to identify specific value to be taken if there are multiple values of the Json path
expression in the response e.g from image above to get the value 8 as the id we use 2 as the value
for Match No.
Default Value: is what should show if the JSON path expression doesn’t have any match.
4. Add a debug sampler to the thread group to confirm the value saved after running the HTTP
request, then use the variable in any other request required.
NB: Using a Debug sampler is optional and the user should proceed to using the variable in
HTTP Request immediately after completing setup. Debug sampler shows the JMeter variable in
the listener(as shown in image below), which is the reason for the recommendation.

Shows the JMeter variables(were extracted from HTTP Request response)


NB: To extract two JSON values using JSON Extractor, see image below(use semicolon to separate the
names, JSON Path Expression, Match No.)

NB: To Extract two value(s) but save then in a single variable check the screenshot property bellow

HOW TO SEND MAIL USING JMETER


SMTP - Simple Mail Transfer Protocol.
SMTP Sampler is used for sending mail in Jmeter
SERVER SETTINGS
Server: This depends on the user email provider(e.g gmail,outlook,yahoo e.t.) smtp server(e.g
smtp.gmail.com for gmail)
Port: has the values in their respective types in it’s front
MAIL SETTINGS:
Address From: Sender’s email address
Address To: receivers email address
Address To BCC/CC: copy receivers email address
AUTH SETTINGS:
Click the “Use Auth” checkbox to provide the user login details
Username: email address of the user sending email
Password: password of the user
SECURITY SETTINGS:
Select either SSL or STARTTLS depending on the port used
MESSAGE SETTINGS:
Subject: contains the title of the mail, the topic or focus of the mail.
Include timestamp in header is used to include time in the mail subject Read more on time
Message: contains the message(mail) contents to be sent.
Note: To use jmeter to send mail on gmail you have to turn on 2FA and also setup app password under the
security feature of the google account settings page

HOW TO USE TIMER IN JMETER


A timer will cause JMeter to delay a certain amount of time before each sampler which is in its scope.
Scope for timers in Jmeter means range (i.e if a timer is added to threadgroup then it will be used by all
requests in the thread group but if request, it is only available for the request).
How to Add timer in Jmeter
1. Right click on Thread group or Request
2. Click on Add button
3. Scroll to Timer
4. Select preferred choice of Timer
Timers can be disabled by following the steps below:
1. Right click on the Timer
2. Click on the Disable button

More on Timer
HOW TO USE LOGIC CONTROLLER IN JMETER
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 controllers are of different types which can help make request classification and grouping easier.
Logic controller can be added by:
1. Right click on thread group
2. Click on Add button
3. Select logic controller
4. Select preferred logic controller from options

HOW TO USE LOGIC CONTROLLER TO RUN REQUEST


1. Add the preferred logic controller(simple controller)
2. Move request into the controller
3. When user move requests into the controller, the request is run with the format or by the way
they are arranged in the controller.
HOW TO HANDLE REQUEST THAT NEEDS TO BE EXECUTED ONCE
1. Right click the thread group > Add > logic controller > Once Only Controller
2. Add the request which only needs to be executed once into the controller

The once only controller will only run once when the test is executed.
HOW TO USE TEST FRAGMENT
The Test Fragment element is a special type of controller that exists on the Test plan tree at the same level
as the Thread Group element. It is distinguished from a Thread Group in that it is not executed unless it is
referenced by either a Module Controller or an Include_Controller. Test fragment can be used to handle
the execution of a script which will be used by multiple scripts e.g order script requires to login, cancel
order also requires login script therefore login script can be placed in the test fragment.
Using Test Fragment with Module controller.
1. Right click on Test plan
2. Click Add
3. Select Test Fragment

4. Setup Test Fragment(i.e add request to the test fragment).


5. Add module controller to run the test fragment by right clicking on request > Click Add > Click
Logic controller > Click module controller
6. Setup Module controller(i.e select module which it is meant to run(test fragment))

7. Add the Module controller into all necessary points it’s needed.

8. Run the request to get the result


Using the Include Controller:
Is used when you want to run your test using a script which probably isn’t used in that Test plan or want
to use an entire Test plan in another test. Requires saving the script/Test plan (login script will be saved
as Test fragment). Script will be used as a sample.
1. Save the Script by right clicking on the request > Save as Test Fragment
2. Add the include controller by right clicking on Thread group > Click Add > Logic controller >
Include Controller

3. Load the saved test fragment(login script) in the include controller by clicking browse and
navigating to the test fragment and click open on the file selector dialogue.
Selector dialogue pops up which is where you navigate to file and select the file the click open

4. Add the Include controller into the necessary place(s).

5. Run the test.

HOW TO DO API PERFORMANCE TESTING


API ---- APPLICATION PROGRAMMING INTERFACE
SOAP : Simple object access protocol
RESTFUL: Representational state transfer
STEPS:
1. Setup tesplan(add thread group and HTTP request)
2. Setup HTTP Request

3. Add Preferred listener and run the request


CHANGING API METHOD(GET,POST,PUT)
1. Setup Test plan(add thread group, and Http Request)
2. Click on the http Request
3. Click on the Request Method then select preferred method

WORKING WITH PARAMETER(S) IN HTTP REQUEST


1. Ensure you are on the parameter tab of the HTTP Request
2. Click the Add button
3. Enter parameter name in the Name tap and
4. Enter Parameter Value in Value tab
5. Add more parameter if needed
WORKING WITH BODY DATA VALUES FOR API TESTING
1. Setup Test plan(add thread group, and Http Request)
2. Switch to the Body tab of the HTTP Request
3. Enter the Body data(s) in the section of the Body tab
4. Run test
WORKING WITH FILE UPLOAD FOR API TESTING
1. Setup Test plan(add thread group, and Http Request)
2. Switch to the File Upload tab
3. Click the Add button
4. Click the browse button and navigate to the file (to add the file path)
5. Enter the Name in the Parameter Name
Note: All mentioned request methods and data use in http request is not only applicable to API testing.

FTP SERVER TESTING


FTP - FILE TRANSFER PROTOCOL
FT Occurs happen between client(e.g local machine) and server(e.g cloud server) which can be done with
tools like filezilla etc.
HOW TO DOWNLOAD USING FTP
1. Add thread group
2. Add Sampler(FTP Request)
3. Add listener
4. Run the test

Note: The local file content can also contain the full path including name of the file to be downloaded e.g
“/Users/seamlesshr/Downloads/demo2.txt” also, it doesn’t only contain the above format only.
HOW TO UPLOAD USING FTP
1. Change the request type to put(STOR)
2. Enter the local file path which is to be uploaded as seen above
3. Enter the path which the file is to be uploaded on the ftp server
NB: When uploading or downloading zip, check the use Binary checkbox

FUNCTIONS AND VARIABLES IN JMETER


Functions are values that can populate fields of any sampler or other test element in test tree
Syntax: ${__functionName(par1,par2..)} or ${__functionName}
par1, par2 are parameters which are passed to the functions when it is called.
Variables: containers to hold values which are local to each thread
Functions can be used as shown below:

The Beanshell function can be used to save a variable. Process is shown bellow:

The image above shows the beanshell function in the Request name field which saves the value of 88*100
into variable1, then variable1 becomes a variable name which can be used in another request
The image above shows the calling of variable1 which was saved using the Beanshell function. When the
request are ran we have:

Note: It is better to use the the function helper in the tools section while dealing with function to make it
easy to use.
Read More

HOW TO MONITOR SERVER HEALTH USING


JMETER(PERFMON)
Perfmon: is a Jmeter plugin used for monitoring server health. Parameters to check with perfmon are:
Cpu usage
Memory
Disk IO
Server: where the application under test is hosted.
Perfmon consist of 2 parts which are Metrics collector Listener and Server agent
HOW PERFMON IS INSTALLED
1. Download Perfmon zip from Perfmon
2. Extract downloaded zip file
3. Open the extracted file
4. Move/copy the jar files in the lib(in the extracted folder) folder into the Jmeter lib folder
5. Move/copy the jar files in the ext(in the extracted folder) folder into the Jmeter lib ext folder

You can also download by following the steps below:


1. Go to the options tab of Jmeter
2. Click on Plugins Manager
3. Switch to the available tab
4. Search for Perfmon
5. Click the checkbox beside it
6. Click apply changes and Restart button
7. On restart Perfmon or installed plugin will be in the installed section
After installation:

To use the Perfmon plugin the server agent needs to be installed on the server which the Application
under test is hosted on. Server agent can be downloaded here
HOW TO INSTALL ON SYSTEM LOCALLY
WINDOWS:
● Extract downloaded file
● Click/ Double click on startAgent.bat
MAC/LINUX:
● Extract downloaded file
● Launch terminal in the extracted folder
● Run the command sh startAgent.sh
NB: Press control+c to stop the running server
HOW TO DO REMOTE DISTRIBUTED TESTING
In the event that your JMeter client machine is unable, performance-wise, to simulate enough users to
stress your server or is limited at network level, an option exists to control multiple, remote JMeter
engines from a single JMeter client. By running JMeter remotely, you can replicate a test across many
low-end computers and thus simulate a larger load on the server. One instance of the JMeter client can
control any number of remote JMeter instances, and collect all the data from them. This offers the
following features:
➢ Saving of test samples to the local machine
➢ Management of multiple JMeterEngines from a single machine
➢ No need to copy the Test plan to each server - the client sends it to all the servers

Pre-Requisites
1. Master & slave machine must have similar version of Jmeter Installed
2. Master & slave machine must have similar version of Java Installed
3. Master and slave machine must connect to each other(same subnet)

Configurations
1. Check Jmeter bin folder for Jmeter.properties file
2. Open file with any preferred editor
3. Search (cmd+f/ctrl+f) for Remote_hosts
4. Launch terminal and run command ipconfig on windows ifconfig on mac
5. Copy IP address from the above command on terminal and Place in Jmeter.properties
6. Duplicate Remote_hosts (step 4 above) and give value as the copied ip address. (can be separated
by comma(,) for multiple slave machines

7. Launch Jmeter
8. Click on the run button on the header tab

9. Click on run then hoover on remote start (should show the newly added ip address)

10. Create a suitable/preferred Test plan


11. Open Jmeter bin folder and run the create-rmi-keystore.sh(mac) or
create-rmi-keystor.bat(window) sh create-rmi-keystore.sh on mac
12. Answer the displayed random question
13. Check for rmi_keystore.jks
14. Copy and paste rmi_keystore.jks to remote host Apache Jmeter bin folder
15. Run the jmeter-server file on the remote host
16. Run Test plan on remote host by clicking on the remote host displayed in 9 above

HOW TO RUN RMTE DISTRIBUTED TESTING ON CLI


1. Launch CLI in the Apache Jmeter bin Folder
2. Enter the following command based on your os:
Windows: jmeter -n -t <path of jmx file> -l <path of csv result> -R <ip address of remote host>
Mac: sh jmeter -n -t <path of jmx file> -l <path of csv result> -R <ip address of remote host>
3. Click enter to run command
BEANSHELL SCRIPTING
WHAT IS BEANSHELL?
Beanshell is a scripting lang developed in java, which can dynamically execute standard java syntax and
also have have scripting features-loose type(variables are declared without any type), commands etc

WHY BEANSHELL
To customize jmeter script in user defined or preferred way

WAYS TO USE BEANSHELL SAMPLER IN JMETER


Beanshell can be used in Jmeter by using any of the following:
1. Beanshell sampler
2. Beanshell Preprocessor
3. Beanshell Post-processor

HOW TO USE BEANSHELL SAMPLER


1. Setup the Test plan and add Thread group
2. Add Beanshell Sampler
3. Enter variable in the script section by using the following syntax:

var variable_name; e.g. var link; Declaring variable


vars.put("variable_name", "value") e.g. vars.put("link", "www.google.com");
assigning value to variable
Var variable_name = vars.get(“previous_variable) used to assign a previous
variable value to a new variable e.g Var x = vars.get(“link”)

4. Add HTTP Request to the thread group


5. Use the variable_name where preferred/intended for e.g. link is for the

6. Run test to see the result


NB:
The following can be performed as well with Beanshell script:
Display on the Log viewer:
log.info("the value of variable_name is: "+ variable_name); OR
log.info("value of Link is: " + vars.get("link"));

NOTE: Displaying on the log viewer requires enabling the log viewer in the Option tab of jmeter
Getting the assigned value of a variable: vars.get(“variable_name); : can also be used for assigning a
previous variable to the new variable as seen above.
Getting the name of executing thread:
ctx.getThread().getThreadName(); can also be assigned to a value
var h = ctx.getThread().getThreadName();

HOW TO USE BEANSHELL PRE-PROCESSOR


1. Setup the Test plan and add Thread group
2. Add two(2) Http Request namely (HTTP Request_1 & HTTP Request_2)
3. Add Beanshell Pre-processor to HTTP Request_2

NOTE: the beanshell pre-processor will be used to create a flow whereby HTTP Request_2 will
not run unless HTTP Request_1 is run bcos the beanshell pre-processor is executed first.
4. Write script in the beanshell pre-processor e.g.
var responsecodeof1 = prev.getResponseCode();
var responsemessageof1 = prev.getResponseMessage();
log.info("Response code of request1 is: " + responsecodeof1);
log.info("Response code of request1 is: " + responsemessageof1);

if(!rresponsecodeof1.equals("200")){
ctx.getEngine().stopTest();
}

Note: the statement in the if method has to be indented


HOW TO USE BEANSHELL POST-PROCESSOR
1. Setup the Test plan and add Thread group
2. Add Http Request to the Thread group
3. Add Beanshell Post-processor to the HTTP Request

Note: The beanshell post-processor is used to write if a test passed in a csv file in this
documentation.
4. Write flow code in the script section of the beanshell post-processor

JMETER INTERVIEW QUESTIONS


1. What is Performance Testing?
Non functional Testing
Ensure application performs well under expected workload
Examines application behaviour under expected workload
Eliminates performance bottlenecks
Some tools used for performance testing are HP LoadRunner, ApacheJmeter, Blazemeter
2. Why is Performance Testing needed?
To check Speed of application
Scalability of the AUT
Stability of the AUT
3. What are the different types of Performance testing?
Load testing
Stress testing
Endurance Testing
Spike Testing
Volume Testing
4. Some common performance problems faced by users
Longer loading time
Poor response time
Poor Scalability

5. Common Performance bottlenecks


CPU Usage: CPU is overloaded and unable to perform tasks in a timely manner
Memory Usage: system doesn’t have sufficient or a fast RAM, which cuts the speed at
which the RAM can serve information to the CPU, WHICH SLOW overall operations
Networking Usage: overloaded server, an overburdened network communication device,
and when the network loses its integrity. Upgrading, adding servers or network hardware
like routers, hubs and access points are the solution.
Software Limitations: Software is designed to handle only a finite number of tasks at
once so it won’t utilize additional CPU or RAM assets even when available. Program
may not be written to work with multiple CPU streams, thus only utilizing a single core
on a multicore processor. Usually resolved through rewriting and Patching software.
Disk Usage: can improve by reducing fragmentation issues and increasing data caching
rates in RAM.
6. What are the Considered Parameters for Performance Testing?
Memory Usage
Processor Usage
Bandwidth
Memory Pages
Response time
CPU Interruption Per seconds
Thread count

7. What is JMeter? How does it work?


Open source performance testing tool
Used to simulate a heavy load on a server or group of server(s) to analyze overall
performance
Java based application
Work with different protocols or technologies - Web HTTP protocol, API, FTP, Database.
8. What is a Test plan in JMeter?
Test plan describes a series of steps required for the JMeter test to run, it usually consists
of Thread Groups, Samplers, logic controllers, listeners e.t.c.
9. What is Thread Group?
Thread group is an element which controls the number of threads(user/request) jmeter
will be used to execute the test. Usually the first element in a test plan.
10. What is Sampler?
An element in jmeter used for sending requests to a server.e.g HTTP request, SMTP
request, FTP Request, TCP request, JDBC Request.
11. What is Parameterization? Why is it required?
Parameterization is the process of creating multiple test data for single/multiple user(s) in
a test script. To ease user manual intervention when large amount of test data is needed/to
be used.
12. What are Listeners?
Are element(s) in JMeter which is used in showing the result of the executed test.
More interview Question can be found at:
Performance Testing Interview questions - Guru99
Performance Testing Interview questions - Edureka
Performance Testing Interview questions - Softwaretestinghelp
Jmeter Interview Questions - Guru99
JMeter Interview Questions - Edureka

You might also like