SlideShare una empresa de Scribd logo
1 de 25
PERFORMANCE TESTING USING
JMETER
Glassbeam App
SOME INTRODUCTION




Performance testing is in general testing performed to determine how
a system performs in terms of responsiveness and stability under a
particular workload. It can also serve to investigate, measure,
validate or verify other quality attributes of the system, such as
scalability, reliability and resource usage.
There are different types of performance testing:







under a specific expected load
Stress testing :: Stress testing is normally used to understand the upper limits of capacity
within the system.
Soak testing :: usually done to determine if the system can sustain the continuous expected
load.
Spike testing :: Spike testing is done by suddenly increasing the number of or load generated
by, users by a very large amount

Load Testing tool:




Load testing :: A load test is usually conducted to understand the behaviour of the system

Jmeter, Load runner etc.

Why Jmeter:


Its open source + fulfill almost all requirement.
INSTALLING AND CONFIGURING JMETER


Install Java




Your PC might already have java installed on your system, if not
just install it from here.
Check your java version:
Go to cmd and type java –version. You will get something like
this:
INSTALLING AND CONFIGURING JMETER
• ADD PATH OF JAVA INSTALLATION IN ENVIRONMENT PATH VARIABLES.

Go to Control Panel >> System >>
Advanced System Setting >> Environment
Variable
Go again to cmd and check the java
version showing correct or not.
DOWNLOAD JMETER


Download jmeter from


https://jmeter.apache.org/download_jmeter.cgi




This will download a zip file. Unzip this to a directory. Better to
unzip in C://
Start jmeter from cmd.
• Traverse to the jmeter installed path , for my case this is :
C:apache-jmeter-2.9bin
• And run jmeter.bat
This will open the GUI of Jmeter.
(If not, the download the dependencies ).
START WORKING WITH JMETER


Add a thread group: Go to
Test Plan>> Add >> Thread group
 Meaning of different parameter:
 Number of Thread : This is
the number of users who will


simultaneously use the app.
ADD AN HTTP REQUEST PARAMETER


Go to Thread Group >> ADD >> Sampler >> HTTP request.



Give the URL address. Port number etc. this takes default ones.
ADD COOKIE MANAGER


GB app depends very much on cookies and most importantly to switch over
to tabs etc, you need this .


Go to Thread Group>> Config Element >> HTTP Cookie
manager


Select Clear cookies each iteration.
ADD CSV DATA SET CONFIG -1
Pre-Configuration::
 This is most important element to add, specially if you
want to test some app, which needs login.
 Our Glassbeam app also require authentication, and at
once, only one user remain active.
 So you need to create maximum number of users in
your database. Eg. If you want to test the app with 20
users, you should have 20 users created on DB(in our
case Mysql DB).
 Add all the username and password in a notepad in
comma separated format and save it as test.csv.
 Save this file under bin of jmeter. ( Just to avoid the
huddels)
ADD CSV DATA SET CONFIG -2
Adding in Jmeter
Go to Thread Group >> Add >> Config Element >> CSV Data Set Config.
Only thing you need to change here is Filename , this will be complete path of your just saved csv file and variable name which
is username and password.( Note down this variable name—This will be used )

On

o
ADD LISTENERS


There are many listeners available you can add any
of those but best ones are: (Thread Group>>Listener>> Component)
Summary report
 View results tree


Aggregate Report
Graph result.
ASSERTION OF RESPONSE


Allow you to assert fact about responses received from HTTP
request
ADD> Assertion >> Response Assertion
ADD RECORDING CONTROLLER
This is one of the most important element to add.
Go to Thread Group >> Logic Controller >>
Recording Controller
 You have to do nothing else here.

RECORDING THE PLAN


Now you need to record the steps what you want to do
while performance testing.
 Go to workbench>> Non text element >> HTTP proxy
server
 Keep everything as default ones .
 From Target Controller select Thread Group >>
Recording controller.
RECORDING THE PLAN -2


URL patterns to exclude/include:


You can add patterns to exclude or include the scripts which
you don’t care. Eg. The response time of jpg,png image etc we
usually don’t care (these are anyways in ms).
RECORDING THE PLAN -3


Now you need to just start the jmeter server. Just
click the Start button.



Now start will change to stop.
BROWSER CONFIGURATION


In Mozilla, go to Options >>
Settings and Choose the
local proxy settings as
shown: Click OK.
START RECORDING
Now go to Browser and type the URL: Remember
this URL should be same as mentioned in HTTP
request.
 This will start recording all the steps you will
perform under Recording Controller.
 You can see various scripts under
Recording controller. These are the
scripts ran to show the Login page.

LOGIN WITH DIFFERENT USERNAME-1
Just go ahead with your recording and Login with
your username and Password.
 Identify the script which is doing the Login
operation. In our case, this is ticketlogin script.

LOGIN WITH DIFFERENT USERNAME-2
Now this is the time to remind you csv data set
config.
 Replace the actual username and password with
variables, eg. ${username} and password.(see the
image)




These variable will take value from the excel sheet
you placed under bin.
ADDING THE TEST CASES


Now whatever you will do , this will get recorded in
jmeter. For example, search for aruba , selecting a
facet etc. For every operation a lot of scripts will get
executed, you need to either filter out or select only
the important ones. Keep recording all the major
steps which may take maximum time.
PLAY BACK











Now you are done with your record, this is time to run it.
Stop recording and Click play button to start playback.
Keep monitoring the result in Summary table, graph
result etc.
Remember to add the desired number of thread etc. in
thread group.
You can add assertion in between each result. This
need to add manually only. This will be not part of
recording.
Note the top right corner of jmeter, this will tell you
whether Jmeter is running or done with the test.
More about listeners like Tree result, summay table etc.
can be found on Jmeter official website.
GRAPH COMPARISON (5 USERS VS 50 USERS)

5 Users

50 Users
SOME IMPORTANT TERMS


Label: In the label section you will able to see all the recorded http request, during test run or after test run.



Samples: Samples denote to the number of http request ran for given thread. Like if we have one http request and we run it with 5 users, than the number
of samples will be 5x1=5.



Same if the sample ran two times for the single user, than the number of samples for 5 users will be 5x2=10.



Average: Average is the average response time for that particular http request. This response time is in millisecond. Like in the image you can see for first
label, in which the number of sample is 4 because that sample run 2 time for single user and i ran the test with 2 user. So for 4 samples the average
response time is 401 ms.



Min: Min denotes to the minimum response time taken by the http request. Like if the minimum response time for first four samples is 266 ms. It means one
http request responded in 266 ms out of four samples.



Max: Max denotes to the maximum response time taken by the http request. Like if the maximum response time for first four samples is 552 ms. It means
one http request responded in 552 ms out of four samples.



90% Line :The 90% line tells you that 90% of the samples fell at or below that number. However, it is more meaningful than average in terms of
SLA. We expect it within 2x of average time. That is, if average time is 500ms, we expect 90% line is less than 1000ms. Otherwise the system
fluctuates a lot.



Error %: This denotes the error percentage in samples during run. This error can be of 404(file not found), or may be exception or any kind of error during
test run will be shown in Error %.



Throughput: The throughput is the number of requests per unit of time (seconds, minutes, hours) that are sent to your server during the test.A1
Happy
TESTING

Más contenido relacionado

La actualidad más candente

Performance testing with JMeter
Performance testing with JMeterPerformance testing with JMeter
Performance testing with JMeterMikael Kundert
 
Introduction to JMeter
Introduction to JMeterIntroduction to JMeter
Introduction to JMeterGalih Lasahido
 
Apache JMeter - A brief introduction
Apache JMeter - A brief introductionApache JMeter - A brief introduction
Apache JMeter - A brief introductionsilenceIT Inc.
 
Performance testing with Apache JMeter
Performance testing with Apache JMeterPerformance testing with Apache JMeter
Performance testing with Apache JMeterRedBlackTree
 
Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeterjvSlideshare
 
Performance Testing With Jmeter
Performance Testing With JmeterPerformance Testing With Jmeter
Performance Testing With JmeterAdam Goucher
 
Performance testing using jmeter
Performance testing using jmeterPerformance testing using jmeter
Performance testing using jmeterRachappa Bandi
 
Performance testing with jmeter
Performance testing with jmeter Performance testing with jmeter
Performance testing with jmeter Knoldus Inc.
 
Load Testing and JMeter Presentation
Load Testing and JMeter PresentationLoad Testing and JMeter Presentation
Load Testing and JMeter PresentationNeill Lima
 
Performance testing and j meter
Performance testing and j meterPerformance testing and j meter
Performance testing and j meterPurna Chandar
 
Performance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introPerformance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introMykola Kovsh
 
JMeter - Performance testing your webapp
JMeter - Performance testing your webappJMeter - Performance testing your webapp
JMeter - Performance testing your webappAmit Solanki
 

La actualidad más candente (20)

Performance testing with JMeter
Performance testing with JMeterPerformance testing with JMeter
Performance testing with JMeter
 
Jmeter From Scratch
Jmeter From ScratchJmeter From Scratch
Jmeter From Scratch
 
J Meter Intro
J Meter IntroJ Meter Intro
J Meter Intro
 
Introduction to JMeter
Introduction to JMeterIntroduction to JMeter
Introduction to JMeter
 
Apache JMeter - A brief introduction
Apache JMeter - A brief introductionApache JMeter - A brief introduction
Apache JMeter - A brief introduction
 
Performance testing with Apache JMeter
Performance testing with Apache JMeterPerformance testing with Apache JMeter
Performance testing with Apache JMeter
 
Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeter
 
JMeter Intro
JMeter IntroJMeter Intro
JMeter Intro
 
Performance Testing With Jmeter
Performance Testing With JmeterPerformance Testing With Jmeter
Performance Testing With Jmeter
 
Load testing with J meter
Load testing with J meterLoad testing with J meter
Load testing with J meter
 
JMeter workshop
JMeter workshopJMeter workshop
JMeter workshop
 
Performance testing using jmeter
Performance testing using jmeterPerformance testing using jmeter
Performance testing using jmeter
 
Performance testing with jmeter
Performance testing with jmeter Performance testing with jmeter
Performance testing with jmeter
 
Load Testing and JMeter Presentation
Load Testing and JMeter PresentationLoad Testing and JMeter Presentation
Load Testing and JMeter Presentation
 
Performance testing and j meter
Performance testing and j meterPerformance testing and j meter
Performance testing and j meter
 
JMeter
JMeterJMeter
JMeter
 
JMeter
JMeterJMeter
JMeter
 
Jmeter
JmeterJmeter
Jmeter
 
Performance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introPerformance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter intro
 
JMeter - Performance testing your webapp
JMeter - Performance testing your webappJMeter - Performance testing your webapp
JMeter - Performance testing your webapp
 

Similar a Performance testing using Jmeter for apps which needs authentication

Software testing
Software testingSoftware testing
Software testingnil65
 
Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Shivakumara .
 
performancetestingjmeter-121109061704-phpapp02
performancetestingjmeter-121109061704-phpapp02performancetestingjmeter-121109061704-phpapp02
performancetestingjmeter-121109061704-phpapp02Gopi Raghavendra
 
performancetestingjmeter-121109061704-phpapp02 (1)
performancetestingjmeter-121109061704-phpapp02 (1)performancetestingjmeter-121109061704-phpapp02 (1)
performancetestingjmeter-121109061704-phpapp02 (1)QA Programmer
 
Soft Test Ireland - Introduction to Jakarta Jmeter - Philip Bannon
Soft Test Ireland - Introduction to Jakarta Jmeter - Philip BannonSoft Test Ireland - Introduction to Jakarta Jmeter - Philip Bannon
Soft Test Ireland - Introduction to Jakarta Jmeter - Philip BannonDavid O'Dowd
 
Jmeter interviewquestions
Jmeter interviewquestionsJmeter interviewquestions
Jmeter interviewquestionsgirichinna27
 
Apachejmeterabriefintroduction
ApachejmeterabriefintroductionApachejmeterabriefintroduction
ApachejmeterabriefintroductionForedoomed
 
Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Nitish Bhardwaj
 
Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeterNaga Mallala
 
Day1_Apache_JMeter_Overview
Day1_Apache_JMeter_OverviewDay1_Apache_JMeter_Overview
Day1_Apache_JMeter_OverviewSravanthi N
 
"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd SessionTharinda Liyanage
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworksVishwanath KC
 
JMeter & ColdFusion
JMeter & ColdFusion JMeter & ColdFusion
JMeter & ColdFusion isummation
 
Iasi code camp 12 october 2013 performance testing for web applications with...
Iasi code camp 12 october 2013  performance testing for web applications with...Iasi code camp 12 october 2013  performance testing for web applications with...
Iasi code camp 12 october 2013 performance testing for web applications with...Codecamp Romania
 
Getting Started with Apache Jmeter
Getting Started with Apache JmeterGetting Started with Apache Jmeter
Getting Started with Apache JmeterMindfire Solutions
 
Best Jmeter Interview Questions- Prepared by Working Professionals
Best Jmeter Interview Questions- Prepared by Working ProfessionalsBest Jmeter Interview Questions- Prepared by Working Professionals
Best Jmeter Interview Questions- Prepared by Working ProfessionalsTesting World
 
JMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterJMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterRapidValue
 

Similar a Performance testing using Jmeter for apps which needs authentication (20)

Software testing
Software testingSoftware testing
Software testing
 
Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02
 
performancetestingjmeter-121109061704-phpapp02
performancetestingjmeter-121109061704-phpapp02performancetestingjmeter-121109061704-phpapp02
performancetestingjmeter-121109061704-phpapp02
 
performancetestingjmeter-121109061704-phpapp02 (1)
performancetestingjmeter-121109061704-phpapp02 (1)performancetestingjmeter-121109061704-phpapp02 (1)
performancetestingjmeter-121109061704-phpapp02 (1)
 
Soft Test Ireland - Introduction to Jakarta Jmeter - Philip Bannon
Soft Test Ireland - Introduction to Jakarta Jmeter - Philip BannonSoft Test Ireland - Introduction to Jakarta Jmeter - Philip Bannon
Soft Test Ireland - Introduction to Jakarta Jmeter - Philip Bannon
 
Jmeter interviewquestions
Jmeter interviewquestionsJmeter interviewquestions
Jmeter interviewquestions
 
JMETER-SKILLWISE
JMETER-SKILLWISEJMETER-SKILLWISE
JMETER-SKILLWISE
 
Apachejmeterabriefintroduction
ApachejmeterabriefintroductionApachejmeterabriefintroduction
Apachejmeterabriefintroduction
 
Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02
 
Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeter
 
Test automation
Test automationTest automation
Test automation
 
Day1_Apache_JMeter_Overview
Day1_Apache_JMeter_OverviewDay1_Apache_JMeter_Overview
Day1_Apache_JMeter_Overview
 
"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
 
JMeter & ColdFusion
JMeter & ColdFusion JMeter & ColdFusion
JMeter & ColdFusion
 
Iasi code camp 12 october 2013 performance testing for web applications with...
Iasi code camp 12 october 2013  performance testing for web applications with...Iasi code camp 12 october 2013  performance testing for web applications with...
Iasi code camp 12 october 2013 performance testing for web applications with...
 
Getting Started with Apache Jmeter
Getting Started with Apache JmeterGetting Started with Apache Jmeter
Getting Started with Apache Jmeter
 
Best Jmeter Interview Questions- Prepared by Working Professionals
Best Jmeter Interview Questions- Prepared by Working ProfessionalsBest Jmeter Interview Questions- Prepared by Working Professionals
Best Jmeter Interview Questions- Prepared by Working Professionals
 
MSSQL Queries.pdf
MSSQL Queries.pdfMSSQL Queries.pdf
MSSQL Queries.pdf
 
JMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterJMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeter
 

Último

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 

Último (20)

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 

Performance testing using Jmeter for apps which needs authentication

  • 2. SOME INTRODUCTION   Performance testing is in general testing performed to determine how a system performs in terms of responsiveness and stability under a particular workload. It can also serve to investigate, measure, validate or verify other quality attributes of the system, such as scalability, reliability and resource usage. There are different types of performance testing:      under a specific expected load Stress testing :: Stress testing is normally used to understand the upper limits of capacity within the system. Soak testing :: usually done to determine if the system can sustain the continuous expected load. Spike testing :: Spike testing is done by suddenly increasing the number of or load generated by, users by a very large amount Load Testing tool:   Load testing :: A load test is usually conducted to understand the behaviour of the system Jmeter, Load runner etc. Why Jmeter:  Its open source + fulfill almost all requirement.
  • 3. INSTALLING AND CONFIGURING JMETER  Install Java   Your PC might already have java installed on your system, if not just install it from here. Check your java version: Go to cmd and type java –version. You will get something like this:
  • 4. INSTALLING AND CONFIGURING JMETER • ADD PATH OF JAVA INSTALLATION IN ENVIRONMENT PATH VARIABLES. Go to Control Panel >> System >> Advanced System Setting >> Environment Variable Go again to cmd and check the java version showing correct or not.
  • 5. DOWNLOAD JMETER  Download jmeter from  https://jmeter.apache.org/download_jmeter.cgi   This will download a zip file. Unzip this to a directory. Better to unzip in C:// Start jmeter from cmd. • Traverse to the jmeter installed path , for my case this is : C:apache-jmeter-2.9bin • And run jmeter.bat This will open the GUI of Jmeter. (If not, the download the dependencies ).
  • 6. START WORKING WITH JMETER  Add a thread group: Go to Test Plan>> Add >> Thread group  Meaning of different parameter:  Number of Thread : This is the number of users who will  simultaneously use the app.
  • 7. ADD AN HTTP REQUEST PARAMETER  Go to Thread Group >> ADD >> Sampler >> HTTP request.  Give the URL address. Port number etc. this takes default ones.
  • 8. ADD COOKIE MANAGER  GB app depends very much on cookies and most importantly to switch over to tabs etc, you need this .  Go to Thread Group>> Config Element >> HTTP Cookie manager  Select Clear cookies each iteration.
  • 9. ADD CSV DATA SET CONFIG -1 Pre-Configuration::  This is most important element to add, specially if you want to test some app, which needs login.  Our Glassbeam app also require authentication, and at once, only one user remain active.  So you need to create maximum number of users in your database. Eg. If you want to test the app with 20 users, you should have 20 users created on DB(in our case Mysql DB).  Add all the username and password in a notepad in comma separated format and save it as test.csv.  Save this file under bin of jmeter. ( Just to avoid the huddels)
  • 10. ADD CSV DATA SET CONFIG -2 Adding in Jmeter Go to Thread Group >> Add >> Config Element >> CSV Data Set Config. Only thing you need to change here is Filename , this will be complete path of your just saved csv file and variable name which is username and password.( Note down this variable name—This will be used ) On o
  • 11. ADD LISTENERS  There are many listeners available you can add any of those but best ones are: (Thread Group>>Listener>> Component) Summary report  View results tree  Aggregate Report Graph result.
  • 12. ASSERTION OF RESPONSE  Allow you to assert fact about responses received from HTTP request ADD> Assertion >> Response Assertion
  • 13. ADD RECORDING CONTROLLER This is one of the most important element to add. Go to Thread Group >> Logic Controller >> Recording Controller  You have to do nothing else here. 
  • 14. RECORDING THE PLAN  Now you need to record the steps what you want to do while performance testing.  Go to workbench>> Non text element >> HTTP proxy server  Keep everything as default ones .  From Target Controller select Thread Group >> Recording controller.
  • 15. RECORDING THE PLAN -2  URL patterns to exclude/include:  You can add patterns to exclude or include the scripts which you don’t care. Eg. The response time of jpg,png image etc we usually don’t care (these are anyways in ms).
  • 16. RECORDING THE PLAN -3  Now you need to just start the jmeter server. Just click the Start button.  Now start will change to stop.
  • 17. BROWSER CONFIGURATION  In Mozilla, go to Options >> Settings and Choose the local proxy settings as shown: Click OK.
  • 18. START RECORDING Now go to Browser and type the URL: Remember this URL should be same as mentioned in HTTP request.  This will start recording all the steps you will perform under Recording Controller.  You can see various scripts under Recording controller. These are the scripts ran to show the Login page. 
  • 19. LOGIN WITH DIFFERENT USERNAME-1 Just go ahead with your recording and Login with your username and Password.  Identify the script which is doing the Login operation. In our case, this is ticketlogin script. 
  • 20. LOGIN WITH DIFFERENT USERNAME-2 Now this is the time to remind you csv data set config.  Replace the actual username and password with variables, eg. ${username} and password.(see the image)   These variable will take value from the excel sheet you placed under bin.
  • 21. ADDING THE TEST CASES  Now whatever you will do , this will get recorded in jmeter. For example, search for aruba , selecting a facet etc. For every operation a lot of scripts will get executed, you need to either filter out or select only the important ones. Keep recording all the major steps which may take maximum time.
  • 22. PLAY BACK       Now you are done with your record, this is time to run it. Stop recording and Click play button to start playback. Keep monitoring the result in Summary table, graph result etc. Remember to add the desired number of thread etc. in thread group. You can add assertion in between each result. This need to add manually only. This will be not part of recording. Note the top right corner of jmeter, this will tell you whether Jmeter is running or done with the test. More about listeners like Tree result, summay table etc. can be found on Jmeter official website.
  • 23. GRAPH COMPARISON (5 USERS VS 50 USERS) 5 Users 50 Users
  • 24. SOME IMPORTANT TERMS  Label: In the label section you will able to see all the recorded http request, during test run or after test run.  Samples: Samples denote to the number of http request ran for given thread. Like if we have one http request and we run it with 5 users, than the number of samples will be 5x1=5.  Same if the sample ran two times for the single user, than the number of samples for 5 users will be 5x2=10.  Average: Average is the average response time for that particular http request. This response time is in millisecond. Like in the image you can see for first label, in which the number of sample is 4 because that sample run 2 time for single user and i ran the test with 2 user. So for 4 samples the average response time is 401 ms.  Min: Min denotes to the minimum response time taken by the http request. Like if the minimum response time for first four samples is 266 ms. It means one http request responded in 266 ms out of four samples.  Max: Max denotes to the maximum response time taken by the http request. Like if the maximum response time for first four samples is 552 ms. It means one http request responded in 552 ms out of four samples.  90% Line :The 90% line tells you that 90% of the samples fell at or below that number. However, it is more meaningful than average in terms of SLA. We expect it within 2x of average time. That is, if average time is 500ms, we expect 90% line is less than 1000ms. Otherwise the system fluctuates a lot.  Error %: This denotes the error percentage in samples during run. This error can be of 404(file not found), or may be exception or any kind of error during test run will be shown in Error %.  Throughput: The throughput is the number of requests per unit of time (seconds, minutes, hours) that are sent to your server during the test.A1