SlideShare a Scribd company logo
1 of 21
JMeter
BY NGUYEN QUOC DUNG
1
What will we achieve?
 Have an overview about JMeter
 How to apply JMeter to the automated test in the real project
2
 Introduction
 Load Testing Tools
 Advantages with JMeter
 How it works
 Your Tests vs JMeter Features
 Thread Group
 Sample
 Listener
 Assertion
 Config Element
 Pre/Post Processor
 Demo
3
Introduction
The Apache JMeter™ application is open source software, a 100% pure Java application designed to
load test functional behavior and measure performance. It was originally designed for testing Web
Applications but has since expanded to other test functions.
4
Load testing tools
• Open source tools
• Jmeter
• AB
• Http_Load
• Seige
• Commercial
• LoadRunner
• WebLoad
• Silk Performer
5
6Advantages with JMeter
• Easy to install and use
• Free
• GUI vs Command line
• Just download and run
• Feature rich
• Record from browser
• Read test data from files
• Add logic, variables and functions
• Run a test from multiple machines
• Test many protocols, not just HTTP
How JMeter works?
End Process
Request sends to the
appropriate Server and
simulates numbers of
users
JMeter collects data to
manipulate statically
information
Server Response
JMeter saves all
responses
User requests for
server connection
Server
7
Get Report
8
Setup
• Check whether Java is installed on the computer
• Run CMD and type the command java –version
• If you see the information like below:
java version "1.8.0_131“
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) Client VM (build 25.131-b11, mixed mode)
• Otherwise, if you see this
’java' is not recognized as an internal or external command, operable
program or batch file
• Then please go to this site
http://www.oracle.com/technetwork/java/javase/down
loads/index.html download and install the latest
version of Java
• For Windows, setting Environment Variable for Java
Installation
https://stackoverflow.com/questions/1672281/environment-
variables-for-java-installation
9Download and Install JMeter
• Go to this page:
http://jmeter.apache.org/download_jmeter.cgi
• Download apache-jmeter-x.x.zip under Binaries section.
At the time of my post, it’s version 4.0, so I need to
download the file apache-jmeter-4.0.zip
• Unzip your downloaded file. You will have the folder
like this
• Run JMeter
• Go to /bin folder
• Find the jmeter.bat file (if you don’t see the .bat
extension, you can observe the Type column of
the file, it should be Windows Batch File)
• Double click on this file
• JMeter UI will appear
Your Tests vs JMeter features
Thread Group
Sampler
Listeners
Assertion
Config Elements
Pre/Post Processors
Timer
Simulate the number of users
Send the request and receive the
response
View and Analyze the results
Check if you are incorrect page
I want to configure my server, url,
data
Parse the response and get the
required value
Simulate user time
10
11
Thread Group
Thread Group elements are the beginning points of your test
plan
• Set the number of threads
• Set the ramp-up period
• Set the number of times to execute the test
12Sampler
Samplers allow JMeter to send
specific types of requests to a server.
They simulate a user request for a
page from the target server
• HTTP Request
• FTP Request
• JDBC Request
• Java Request
• JUnit Request
• LDAP Request
13Listeners
Listeners let you view the results of
Samplers in the form of tables,
graphs, trees, or simple text in some
log files.
• View Results Tree
• View Results Table
• Aggregate Report
• Summary Report
14Assertion
Assertions allow you to include some
validation test on the response of
your request made using a Sampler
Response Assertion
JSON Assertion
XPath Assertion
 HTML Assertion
 XML Assertion
 Compare Assertion
15Config Elements
Configuration Elements allow you to
create defaults and variables to be
used by Samplers. They are used to
add or modify requests made by
Samplers
• HTTP Request
Defaults
• HTTP Header
Manager
• User Defined
Variables
• CSV Data Set Config
• HTTP Cookie Manager
16Pre Processors
A pre-processor element is something
that runs just before a sampler
executes. They are often used to
modify the settings of a Sample
Request just before it runs, or to
update variables that are not
extracted from response text
• JSR223
PreProcessor
• JDBC PreProcessor
• BeanShell
PreProcessor
• RegEx User Parameters
• Sample Timeout
• HTTP URL Re-writing
Modifier
17Post Processors
A post-processor executes after a
sampler finishes its execution. This
element is most often used to process
the response data, for example, to
retrieve a particular value for later use
• JSR223
PostProcessor
• JSON Extractor
• Debug
PostProcessor
• XPath Extractor
• CSS/JQuery Extractor
• Regular Expression
Extractor
Demo 1: Building a Basic Web Test Plan JMeter 18
Scenario
• Create Test Plan accesses to 3 HTTP Requests in http://ritvn.com/
• 3 HTTP Requests are: Homepage, What we do and Who we need
• Run the test with 5 users and Loop 2 times
Steps
1. Adding Thread Group
2. Adding HTTP Requests
3. Adding Listeners
4. Running the Test
5. Optimizing
Demo 2: CSV Data Set Config 19
Scenario
To login success to the system, JMeter need read data of user for login such as
username and password from CSV file
Note
1. File name
2. File encoding
3. Variable Names
• Leave blank to the redundant field
• JMeter supports CSV header lines
4. Delimiter
How to apply JMeter to the automated test in the real
project
20
TeamCity CI job
JMeter script
Run JMeter tests
Translate JMeter
log to test results
Analyze and send report to
team
References 21
• https://jmeter.apache.org/
• https://jmetervn.com/2017/01/28/list-of-all-posts/
• https://www.softwaretestingclass.com/introduction-to-apache-jmeter-tutorial-series-1/
• https://jmetervn.com/2017/02/27/setup-and-install-jmeter/
• https://www.slideshare.net/srirambk/load-testing-jmeter
• https://www.slideshare.net/NexThoughts/apache-jmeter-65352695

More Related Content

What's hot

Performance Testing Using JMeter | Edureka
Performance Testing Using JMeter | EdurekaPerformance Testing Using JMeter | Edureka
Performance Testing Using JMeter | EdurekaEdureka!
 
JMeter - Performance testing your webapp
JMeter - Performance testing your webappJMeter - Performance testing your webapp
JMeter - Performance testing your webappAmit Solanki
 
Performance testing jmeter
Performance testing jmeterPerformance testing jmeter
Performance testing jmeterBhojan Rajan
 
Performance testing using jmeter
Performance testing using jmeterPerformance testing using jmeter
Performance testing using jmeterRachappa Bandi
 
Performance testing with JMeter
Performance testing with JMeterPerformance testing with JMeter
Performance testing with JMeterMikael Kundert
 
Performance testing with Jmeter
Performance testing with JmeterPerformance testing with Jmeter
Performance testing with JmeterPrashanth Kumar
 
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
 
Load Testing Using JMeter Tutorial | Edureka
Load Testing Using JMeter Tutorial | EdurekaLoad Testing Using JMeter Tutorial | Edureka
Load Testing Using JMeter Tutorial | EdurekaEdureka!
 
Performance testing using Jmeter for apps which needs authentication
Performance testing using Jmeter for apps which needs authenticationPerformance testing using Jmeter for apps which needs authentication
Performance testing using Jmeter for apps which needs authenticationJay Jha
 
Mesurer les performances avec JMeter
Mesurer les performances avec JMeterMesurer les performances avec JMeter
Mesurer les performances avec JMeterClaude Falguiere
 
Apache JMeter - A brief introduction
Apache JMeter - A brief introductionApache JMeter - A brief introduction
Apache JMeter - A brief introductionsilenceIT Inc.
 
Introduction to blazemeter and jmeter
Introduction to blazemeter and jmeterIntroduction to blazemeter and jmeter
Introduction to blazemeter and jmeterb4usolution .
 
Performance testing with Apache JMeter
Performance testing with Apache JMeterPerformance testing with Apache JMeter
Performance testing with Apache JMeterRedBlackTree
 

What's hot (20)

JMeter Intro
JMeter IntroJMeter Intro
JMeter Intro
 
Performance Testing Using JMeter | Edureka
Performance Testing Using JMeter | EdurekaPerformance Testing Using JMeter | Edureka
Performance Testing Using JMeter | Edureka
 
JMeter - Performance testing your webapp
JMeter - Performance testing your webappJMeter - Performance testing your webapp
JMeter - Performance testing your webapp
 
Performance testing jmeter
Performance testing jmeterPerformance testing jmeter
Performance testing jmeter
 
Performance testing using jmeter
Performance testing using jmeterPerformance testing using jmeter
Performance testing using jmeter
 
Performance testing with JMeter
Performance testing with JMeterPerformance testing with JMeter
Performance testing with JMeter
 
Load testing jmeter
Load testing jmeterLoad testing jmeter
Load testing jmeter
 
JMeter
JMeterJMeter
JMeter
 
Load testing with J meter
Load testing with J meterLoad testing with J meter
Load testing with J meter
 
Performance testing with Jmeter
Performance testing with JmeterPerformance 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
 
Apache jMeter
Apache jMeterApache jMeter
Apache jMeter
 
Performance testing and j meter
Performance testing and j meterPerformance testing and j meter
Performance testing and j meter
 
Load Testing Using JMeter Tutorial | Edureka
Load Testing Using JMeter Tutorial | EdurekaLoad Testing Using JMeter Tutorial | Edureka
Load Testing Using JMeter Tutorial | Edureka
 
Performance testing using Jmeter for apps which needs authentication
Performance testing using Jmeter for apps which needs authenticationPerformance testing using Jmeter for apps which needs authentication
Performance testing using Jmeter for apps which needs authentication
 
JMeter workshop
JMeter workshopJMeter workshop
JMeter workshop
 
Mesurer les performances avec JMeter
Mesurer les performances avec JMeterMesurer les performances avec JMeter
Mesurer les performances avec JMeter
 
Apache JMeter - A brief introduction
Apache JMeter - A brief introductionApache JMeter - A brief introduction
Apache JMeter - A brief introduction
 
Introduction to blazemeter and jmeter
Introduction to blazemeter and jmeterIntroduction to blazemeter and jmeter
Introduction to blazemeter and jmeter
 
Performance testing with Apache JMeter
Performance testing with Apache JMeterPerformance testing with Apache JMeter
Performance testing with Apache JMeter
 

Similar to JMeter

Jmeter_Presentaion_Parag
Jmeter_Presentaion_ParagJmeter_Presentaion_Parag
Jmeter_Presentaion_ParagPARAG KHEDIKAR
 
J meter introduction
J meter introductionJ meter introduction
J meter introductionBharath Kumar
 
Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Nitish Bhardwaj
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance TestingAtul Pant
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeterlethibichhoa
 
Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Shivakumara .
 
Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeterNaga Mallala
 
Load Test Drupal Site Using JMeter and Amazon AWS
Load Test Drupal Site Using JMeter and Amazon AWSLoad Test Drupal Site Using JMeter and Amazon AWS
Load Test Drupal Site Using JMeter and Amazon AWSVladimir Ilic
 
Test talk academy apachejmeter-120521121306-phpapp02
Test talk academy apachejmeter-120521121306-phpapp02Test talk academy apachejmeter-120521121306-phpapp02
Test talk academy apachejmeter-120521121306-phpapp02veeru madduri
 
J-meter Workshop Vodqa
J-meter Workshop VodqaJ-meter Workshop Vodqa
J-meter Workshop VodqaThoughtworks
 
JMeter Workshop vodQA
JMeter Workshop vodQAJMeter Workshop vodQA
JMeter Workshop vodQAvodQA
 
Day1 JMeter_training_overview
Day1 JMeter_training_overviewDay1 JMeter_training_overview
Day1 JMeter_training_overviewSravanthiN
 
Testing - How Vital and How Easy to use
Testing - How Vital and How Easy to useTesting - How Vital and How Easy to use
Testing - How Vital and How Easy to useUma Ghotikar
 
Day1_Apache_JMeter_Overview
Day1_Apache_JMeter_OverviewDay1_Apache_JMeter_Overview
Day1_Apache_JMeter_OverviewSravanthi N
 
Find the bottleneck of your system
Find the bottleneck of your systemFind the bottleneck of your system
Find the bottleneck of your systemJian-Hong Pan
 
"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
 
performancetestingjmeter-121109061704-phpapp02
performancetestingjmeter-121109061704-phpapp02performancetestingjmeter-121109061704-phpapp02
performancetestingjmeter-121109061704-phpapp02Gopi Raghavendra
 

Similar to JMeter (20)

Jmeter_Presentaion_Parag
Jmeter_Presentaion_ParagJmeter_Presentaion_Parag
Jmeter_Presentaion_Parag
 
J meter introduction
J meter introductionJ meter introduction
J meter introduction
 
Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeter
 
Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02
 
J meter
J meterJ meter
J meter
 
JMeter.ppt
JMeter.pptJMeter.ppt
JMeter.ppt
 
Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeter
 
Load Test Drupal Site Using JMeter and Amazon AWS
Load Test Drupal Site Using JMeter and Amazon AWSLoad Test Drupal Site Using JMeter and Amazon AWS
Load Test Drupal Site Using JMeter and Amazon AWS
 
Test talk academy apachejmeter-120521121306-phpapp02
Test talk academy apachejmeter-120521121306-phpapp02Test talk academy apachejmeter-120521121306-phpapp02
Test talk academy apachejmeter-120521121306-phpapp02
 
J-meter Workshop Vodqa
J-meter Workshop VodqaJ-meter Workshop Vodqa
J-meter Workshop Vodqa
 
JMeter Workshop vodQA
JMeter Workshop vodQAJMeter Workshop vodQA
JMeter Workshop vodQA
 
Day1 JMeter_training_overview
Day1 JMeter_training_overviewDay1 JMeter_training_overview
Day1 JMeter_training_overview
 
Testing - How Vital and How Easy to use
Testing - How Vital and How Easy to useTesting - How Vital and How Easy to use
Testing - How Vital and How Easy to use
 
Day1_Apache_JMeter_Overview
Day1_Apache_JMeter_OverviewDay1_Apache_JMeter_Overview
Day1_Apache_JMeter_Overview
 
Find the bottleneck of your system
Find the bottleneck of your systemFind the bottleneck of your system
Find the bottleneck of your system
 
"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session
 
JMETER-SKILLWISE
JMETER-SKILLWISEJMETER-SKILLWISE
JMETER-SKILLWISE
 
performancetestingjmeter-121109061704-phpapp02
performancetestingjmeter-121109061704-phpapp02performancetestingjmeter-121109061704-phpapp02
performancetestingjmeter-121109061704-phpapp02
 

Recently uploaded

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 

Recently uploaded (20)

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 

JMeter

  • 2. What will we achieve?  Have an overview about JMeter  How to apply JMeter to the automated test in the real project 2
  • 3.  Introduction  Load Testing Tools  Advantages with JMeter  How it works  Your Tests vs JMeter Features  Thread Group  Sample  Listener  Assertion  Config Element  Pre/Post Processor  Demo 3
  • 4. Introduction The Apache JMeter™ application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions. 4
  • 5. Load testing tools • Open source tools • Jmeter • AB • Http_Load • Seige • Commercial • LoadRunner • WebLoad • Silk Performer 5
  • 6. 6Advantages with JMeter • Easy to install and use • Free • GUI vs Command line • Just download and run • Feature rich • Record from browser • Read test data from files • Add logic, variables and functions • Run a test from multiple machines • Test many protocols, not just HTTP
  • 7. How JMeter works? End Process Request sends to the appropriate Server and simulates numbers of users JMeter collects data to manipulate statically information Server Response JMeter saves all responses User requests for server connection Server 7 Get Report
  • 8. 8 Setup • Check whether Java is installed on the computer • Run CMD and type the command java –version • If you see the information like below: java version "1.8.0_131“ Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) Client VM (build 25.131-b11, mixed mode) • Otherwise, if you see this ’java' is not recognized as an internal or external command, operable program or batch file • Then please go to this site http://www.oracle.com/technetwork/java/javase/down loads/index.html download and install the latest version of Java • For Windows, setting Environment Variable for Java Installation https://stackoverflow.com/questions/1672281/environment- variables-for-java-installation
  • 9. 9Download and Install JMeter • Go to this page: http://jmeter.apache.org/download_jmeter.cgi • Download apache-jmeter-x.x.zip under Binaries section. At the time of my post, it’s version 4.0, so I need to download the file apache-jmeter-4.0.zip • Unzip your downloaded file. You will have the folder like this • Run JMeter • Go to /bin folder • Find the jmeter.bat file (if you don’t see the .bat extension, you can observe the Type column of the file, it should be Windows Batch File) • Double click on this file • JMeter UI will appear
  • 10. Your Tests vs JMeter features Thread Group Sampler Listeners Assertion Config Elements Pre/Post Processors Timer Simulate the number of users Send the request and receive the response View and Analyze the results Check if you are incorrect page I want to configure my server, url, data Parse the response and get the required value Simulate user time 10
  • 11. 11 Thread Group Thread Group elements are the beginning points of your test plan • Set the number of threads • Set the ramp-up period • Set the number of times to execute the test
  • 12. 12Sampler Samplers allow JMeter to send specific types of requests to a server. They simulate a user request for a page from the target server • HTTP Request • FTP Request • JDBC Request • Java Request • JUnit Request • LDAP Request
  • 13. 13Listeners Listeners let you view the results of Samplers in the form of tables, graphs, trees, or simple text in some log files. • View Results Tree • View Results Table • Aggregate Report • Summary Report
  • 14. 14Assertion Assertions allow you to include some validation test on the response of your request made using a Sampler Response Assertion JSON Assertion XPath Assertion  HTML Assertion  XML Assertion  Compare Assertion
  • 15. 15Config Elements Configuration Elements allow you to create defaults and variables to be used by Samplers. They are used to add or modify requests made by Samplers • HTTP Request Defaults • HTTP Header Manager • User Defined Variables • CSV Data Set Config • HTTP Cookie Manager
  • 16. 16Pre Processors A pre-processor element is something that runs just before a sampler executes. They are often used to modify the settings of a Sample Request just before it runs, or to update variables that are not extracted from response text • JSR223 PreProcessor • JDBC PreProcessor • BeanShell PreProcessor • RegEx User Parameters • Sample Timeout • HTTP URL Re-writing Modifier
  • 17. 17Post Processors A post-processor executes after a sampler finishes its execution. This element is most often used to process the response data, for example, to retrieve a particular value for later use • JSR223 PostProcessor • JSON Extractor • Debug PostProcessor • XPath Extractor • CSS/JQuery Extractor • Regular Expression Extractor
  • 18. Demo 1: Building a Basic Web Test Plan JMeter 18 Scenario • Create Test Plan accesses to 3 HTTP Requests in http://ritvn.com/ • 3 HTTP Requests are: Homepage, What we do and Who we need • Run the test with 5 users and Loop 2 times Steps 1. Adding Thread Group 2. Adding HTTP Requests 3. Adding Listeners 4. Running the Test 5. Optimizing
  • 19. Demo 2: CSV Data Set Config 19 Scenario To login success to the system, JMeter need read data of user for login such as username and password from CSV file Note 1. File name 2. File encoding 3. Variable Names • Leave blank to the redundant field • JMeter supports CSV header lines 4. Delimiter
  • 20. How to apply JMeter to the automated test in the real project 20 TeamCity CI job JMeter script Run JMeter tests Translate JMeter log to test results Analyze and send report to team
  • 21. References 21 • https://jmeter.apache.org/ • https://jmetervn.com/2017/01/28/list-of-all-posts/ • https://www.softwaretestingclass.com/introduction-to-apache-jmeter-tutorial-series-1/ • https://jmetervn.com/2017/02/27/setup-and-install-jmeter/ • https://www.slideshare.net/srirambk/load-testing-jmeter • https://www.slideshare.net/NexThoughts/apache-jmeter-65352695

Editor's Notes

  1. Set the Number of Threads (Users): Number of users to simulate. Set the Ramp-Up Period: The ramp-up period tells JMeter how long to take to “ramp-up” to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10(100/10) seconds after the previous thread was begun. For example, the test started at 01:48:02 Another example: If there are 30 threads and a ramp-up period of 120seconds, then each successive thread will be delayed by 4 seconds.Ramp-up needs to be long enough to avoid too large a workload at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).You Should start with Ramp-up = number of threads and adjust up or down as needed.NOTE: If Ramp-up = 0, so the test will be held until all threads were created, then start them all at the same time. Set the Loop Count – the number of times to execute the test for each thread group. Alternatively, forever can be selected causing the test to run until manually stopped, or until meet the stop condition, such as stop test when has an error, or reach the End Time, run out of the Duration time, etc.If “Loop Forever” checkbox is checked, it means the request will be executed forever for each thread group, until the test has been stopped (by facing the error, reaching the End Time or Duration Time defined in Scheduler Configuration, see section below)By default, the thread group is configured to loop once through its elements.