SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
Introduction to JMeter
          Magus Chen
    maguschen@gmail.com
   http://magustest.com/blog
Agenda

● Performance testing
● What is JMeter
● JMeter basic elements
● Jmeter Plugins
● Example
Performance Testing

● Performance testing is in general testing performed to
   determine how a system performs in terms of responsiveness
   and stability under a particular workload.
Performance Testing

●   Load Testing
    ○ Load testing is the simplest form of performance testing. A load test
       is usually conducted to understand the behaviour of the system under
       a specific expected load.
●   Stress testing
    ○ Stress testing is normally used to understand the upper limits of
       capacity within the system. This kind of test is done to determine the
       system's robustness in terms of extreme load
Performance Testing

●   Performance Goals
    ○ Concurrency/throughput
       ■ Transactions per second the application under test can
          handle
    ○ Server response time
       ■ Amount of time the application under test takes to
          process a request after it has received.
What is JMeter

● Apache JMeter is an Apache project that can be used as a load
   testing tool for analyzing and measuring the performance of a
   variety of services, with a focus on web applications.
JMeter basic elements

● Test Plan
● Thread Group
● Sampler
● Assertion
● Listener
● Logic Controller
● Timer
● Config Element
● Pre-Processor / Post-Processor
JMeter basic elements
Test Plan

A test plan describes a series of steps JMeter will
execute when run. A complete test plan will consist
of one or more Thread Groups, logic conrollers,
sample generating controllers, listeners, timers,
assertions, and configuration elements.
Thread Group

Thread group elements are the beginning points of
any test plan. All controllers and samplers must be
under a thread group.
Sampler

Samplers tell JMeter to send requests to a server and
wait for a response. They are processed in the order
they appear in the tree.
Assertion

Assertions allow you to assert facts about responses
received from the server being tested. Using an
assertion, you can essentially "test" that your
application is returning the results you expect it to.
Listener

Listeners provide access to the information JMeter
gathers about the test cases while JMeter runs.
Logic Controller

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.
Timer

The timer will cause JMeter to delay a certain
amount of time before each sampler which is in its
scope .
Config Element

A configuration element works closely with a
Sampler. Although it does not send requests (except
for HTTP Proxy Server ), it can add to or modify
requests.
Pre-Processor / Post-Processor

● A Pre-Processor executes some action prior to a
  Sampler Request being made
● A Post-Processor executes some action after a
  Sampler Request has been made
Execution Order

1. Config Element
2. Pre-Processor
3. Timer
4. Sampler
5. Post-Processor
6. Assertion
7. Listener
Jmeter Plugins

●   A plugin of Jmeter, lots of great features
    ○ Stepping Thread Group
    ○ PerfMon Metrics Collector
    ○ Response Times vs Threads
    ○ Response Times Distribution
    ○ Parameterized Controller
Example

● 30 login user threads
   ○ Ramp up: Start 3 threads every 10 seconds
   ○ Hold for 300 seconds
   ○ Stop 2 threads every 5 seconds
● 10 guest threads
   ○ Ramp up: Start 1 thread every 10 seconds
   ○ Hold for 300 seconds
   ○ Stop 1 thread every 5 seconds
Example
Target Page        Sample     Average response time   Throughtput

Guest Start page   4796       149                     10

Start page         10892      247                     23

Contenu connexe

Tendances

Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
Atul Pant
 

Tendances (20)

Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
 
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
 
Automation - Apache JMeter
Automation - Apache JMeterAutomation - Apache JMeter
Automation - Apache JMeter
 
Apache jMeter
Apache jMeterApache jMeter
Apache jMeter
 
Performance testing with JMeter
Performance testing with JMeterPerformance testing with JMeter
Performance testing with JMeter
 
Performance testing with jmeter
Performance testing with jmeter Performance testing with jmeter
Performance testing with jmeter
 
Introduction to blazemeter and jmeter
Introduction to blazemeter and jmeterIntroduction to blazemeter and jmeter
Introduction to blazemeter and jmeter
 
Performance testing and j meter
Performance testing and j meterPerformance testing and j meter
Performance testing and j meter
 
Performance testing using jmeter
Performance testing using jmeterPerformance testing using jmeter
Performance testing using jmeter
 
JMeter
JMeterJMeter
JMeter
 
Mesurer les performances avec JMeter
Mesurer les performances avec JMeterMesurer les performances avec JMeter
Mesurer les performances avec JMeter
 
Jmeter From Scratch
Jmeter From ScratchJmeter From Scratch
Jmeter From Scratch
 
Load Testing and JMeter Presentation
Load Testing and JMeter PresentationLoad Testing and JMeter Presentation
Load Testing and JMeter Presentation
 
JMeter Intro
JMeter IntroJMeter Intro
JMeter Intro
 
Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeter
 
Performance testing with Jmeter
Performance testing with JmeterPerformance testing with Jmeter
Performance testing with Jmeter
 
JMeter & ColdFusion
JMeter & ColdFusion JMeter & ColdFusion
JMeter & ColdFusion
 
Introduction to JMeter
Introduction to JMeterIntroduction to JMeter
Introduction to JMeter
 
Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeter
 

En vedette

Introduction to JMeter
Introduction to JMeterIntroduction to JMeter
Introduction to JMeter
Rahul Sudame
 
How to Analyze Reports in Jmeter
How to Analyze Reports in JmeterHow to Analyze Reports in Jmeter
How to Analyze Reports in Jmeter
Viviana Lesmes
 
Load Testing & Apache JMeter
Load Testing & Apache JMeterLoad Testing & Apache JMeter
Load Testing & Apache JMeter
WO Community
 
Apachejmeterabriefintroduction
ApachejmeterabriefintroductionApachejmeterabriefintroduction
Apachejmeterabriefintroduction
Foredoomed
 
Apache JMeter Introduction
Apache JMeter IntroductionApache JMeter Introduction
Apache JMeter Introduction
Søren Lund
 
JMeter - Performance testing your webapp
JMeter - Performance testing your webappJMeter - Performance testing your webapp
JMeter - Performance testing your webapp
Amit Solanki
 

En vedette (18)

Introduction to Jmeter
Introduction to JmeterIntroduction to Jmeter
Introduction to Jmeter
 
"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session
 
What Is JMeter?
What Is JMeter?What Is JMeter?
What Is JMeter?
 
Introduction to JMeter
Introduction to JMeterIntroduction to JMeter
Introduction to JMeter
 
How to Analyze Reports in Jmeter
How to Analyze Reports in JmeterHow to Analyze Reports in Jmeter
How to Analyze Reports in Jmeter
 
Jmeter
JmeterJmeter
Jmeter
 
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testing
 
Cucumber
CucumberCucumber
Cucumber
 
Load Testing & Apache JMeter
Load Testing & Apache JMeterLoad Testing & Apache JMeter
Load Testing & Apache JMeter
 
Apachejmeterabriefintroduction
ApachejmeterabriefintroductionApachejmeterabriefintroduction
Apachejmeterabriefintroduction
 
Apache JMeter Introduction
Apache JMeter IntroductionApache JMeter Introduction
Apache JMeter Introduction
 
Jmeter introduction
Jmeter introductionJmeter introduction
Jmeter introduction
 
JMeter
JMeterJMeter
JMeter
 
JMeter - Performance testing your webapp
JMeter - Performance testing your webappJMeter - Performance testing your webapp
JMeter - Performance testing your webapp
 
JMeter workshop
JMeter workshopJMeter workshop
JMeter workshop
 
Performance Engineering Basics
Performance Engineering BasicsPerformance Engineering Basics
Performance Engineering Basics
 
Cucumber - Curso de Automatización de Pruebas
Cucumber - Curso de Automatización de PruebasCucumber - Curso de Automatización de Pruebas
Cucumber - Curso de Automatización de Pruebas
 
Apache JMeter - A Brief Introduction
Apache JMeter - A Brief IntroductionApache JMeter - A Brief Introduction
Apache JMeter - A Brief Introduction
 

Similaire à Introduction to jmeter

Software testing
Software testingSoftware testing
Software testing
nil65
 
Jmeter_Presentaion_Parag
Jmeter_Presentaion_ParagJmeter_Presentaion_Parag
Jmeter_Presentaion_Parag
PARAG KHEDIKAR
 
Jmeter load testing
Jmeter load testingJmeter load testing
Jmeter load testing
Ali Raza
 
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
David O'Dowd
 

Similaire à Introduction to jmeter (20)

Jmeter Walkthrough
Jmeter WalkthroughJmeter Walkthrough
Jmeter Walkthrough
 
Test talk academy apachejmeter-120521121306-phpapp02
Test talk academy apachejmeter-120521121306-phpapp02Test talk academy apachejmeter-120521121306-phpapp02
Test talk academy apachejmeter-120521121306-phpapp02
 
Day1 JMeter_training_overview
Day1 JMeter_training_overviewDay1 JMeter_training_overview
Day1 JMeter_training_overview
 
Day1_Apache_JMeter_Overview
Day1_Apache_JMeter_OverviewDay1_Apache_JMeter_Overview
Day1_Apache_JMeter_Overview
 
J meter introduction
J meter introductionJ meter introduction
J meter introduction
 
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
 
JMeter.ppt
JMeter.pptJMeter.ppt
JMeter.ppt
 
Software testing
Software testingSoftware testing
Software testing
 
Apache J meter
Apache J meterApache J meter
Apache J meter
 
Automation for developers
Automation for developersAutomation for developers
Automation for developers
 
Jmeter.ppt
Jmeter.pptJmeter.ppt
Jmeter.ppt
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeter
 
Jmeter_Presentaion_Parag
Jmeter_Presentaion_ParagJmeter_Presentaion_Parag
Jmeter_Presentaion_Parag
 
Day4_Part 1_Apache_JMeter_Performance_Test_Execution_GUI_Mode
Day4_Part 1_Apache_JMeter_Performance_Test_Execution_GUI_ModeDay4_Part 1_Apache_JMeter_Performance_Test_Execution_GUI_Mode
Day4_Part 1_Apache_JMeter_Performance_Test_Execution_GUI_Mode
 
JMETER-SKILLWISE
JMETER-SKILLWISEJMETER-SKILLWISE
JMETER-SKILLWISE
 
Jmeter load testing
Jmeter load testingJmeter load testing
Jmeter load testing
 
Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02
 
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
 
Top 20 JMeter Interview Questions and Answers in 2023.pdf
Top 20 JMeter Interview Questions and Answers in 2023.pdfTop 20 JMeter Interview Questions and Answers in 2023.pdf
Top 20 JMeter Interview Questions and Answers in 2023.pdf
 
Top 20 JMeter Interview Questions and Answers in 2023.pptx
Top 20 JMeter Interview Questions and Answers in 2023.pptxTop 20 JMeter Interview Questions and Answers in 2023.pptx
Top 20 JMeter Interview Questions and Answers in 2023.pptx
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Introduction to jmeter

  • 1. Introduction to JMeter Magus Chen maguschen@gmail.com http://magustest.com/blog
  • 2. Agenda ● Performance testing ● What is JMeter ● JMeter basic elements ● Jmeter Plugins ● Example
  • 3. Performance Testing ● Performance testing is in general testing performed to determine how a system performs in terms of responsiveness and stability under a particular workload.
  • 4. Performance Testing ● Load Testing ○ Load testing is the simplest form of performance testing. A load test is usually conducted to understand the behaviour of the system under a specific expected load. ● Stress testing ○ Stress testing is normally used to understand the upper limits of capacity within the system. This kind of test is done to determine the system's robustness in terms of extreme load
  • 5. Performance Testing ● Performance Goals ○ Concurrency/throughput ■ Transactions per second the application under test can handle ○ Server response time ■ Amount of time the application under test takes to process a request after it has received.
  • 6. What is JMeter ● Apache JMeter is an Apache project that can be used as a load testing tool for analyzing and measuring the performance of a variety of services, with a focus on web applications.
  • 7. JMeter basic elements ● Test Plan ● Thread Group ● Sampler ● Assertion ● Listener ● Logic Controller ● Timer ● Config Element ● Pre-Processor / Post-Processor
  • 9. Test Plan A test plan describes a series of steps JMeter will execute when run. A complete test plan will consist of one or more Thread Groups, logic conrollers, sample generating controllers, listeners, timers, assertions, and configuration elements.
  • 10. Thread Group Thread group elements are the beginning points of any test plan. All controllers and samplers must be under a thread group.
  • 11. Sampler Samplers tell JMeter to send requests to a server and wait for a response. They are processed in the order they appear in the tree.
  • 12. Assertion Assertions allow you to assert facts about responses received from the server being tested. Using an assertion, you can essentially "test" that your application is returning the results you expect it to.
  • 13. Listener Listeners provide access to the information JMeter gathers about the test cases while JMeter runs.
  • 14. Logic Controller 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.
  • 15. Timer The timer will cause JMeter to delay a certain amount of time before each sampler which is in its scope .
  • 16. Config Element A configuration element works closely with a Sampler. Although it does not send requests (except for HTTP Proxy Server ), it can add to or modify requests.
  • 17. Pre-Processor / Post-Processor ● A Pre-Processor executes some action prior to a Sampler Request being made ● A Post-Processor executes some action after a Sampler Request has been made
  • 18. Execution Order 1. Config Element 2. Pre-Processor 3. Timer 4. Sampler 5. Post-Processor 6. Assertion 7. Listener
  • 19. Jmeter Plugins ● A plugin of Jmeter, lots of great features ○ Stepping Thread Group ○ PerfMon Metrics Collector ○ Response Times vs Threads ○ Response Times Distribution ○ Parameterized Controller
  • 20. Example ● 30 login user threads ○ Ramp up: Start 3 threads every 10 seconds ○ Hold for 300 seconds ○ Stop 2 threads every 5 seconds ● 10 guest threads ○ Ramp up: Start 1 thread every 10 seconds ○ Hold for 300 seconds ○ Stop 1 thread every 5 seconds
  • 21. Example Target Page Sample Average response time Throughtput Guest Start page 4796 149 10 Start page 10892 247 23