SlideShare a Scribd company logo
GETTING STARTED:
SCRIPTING WITH JMETER
Apache JMeter is a great tool for simulating
performance testing on web-applications, but
it may seem tricky at first glance.
Learn how to create your first JMeter script
from scratch.
GETTING STARTED
• Download JMeter from the official Apache JMeter
website
• Unzip the distribution and copy it a folder on your
computer.
• You need to have JRE 1.6 or above to run JMeter,
because it's written in pure JAVA.
• If you are running WINDOWS- Go to
$JMETER_HOME/bin and run jMeter.bat or If you
are using *nix –Go to JMeter
TEST PLAN (1)
The Test Plan is the core element of the test script.
2 tables and 3check-boxes.
TEST PLAN (2)
#1 Table
• User Defined Variables, allows us to set variables, which can
be used in any other part of the script
• These values can be set up as a variables simply eliminating
the need to update the script.
#2 Table
• Is used for making test plan databases, in order to make the
JDBC driver visible for JMeter and able to execute the SQL
queries.
• Add JDBC *.jar to this table, and JMeter will recognize it.
CHECK BOX #1
If this option is checked, than all Thread Groups will
be executed one by one.
This may be useful in cases such as if the first Thread
Group prepares test-data for a test, and the next one
uses this set.
Run Thread Group Consecutively
CHECK BOX #2
Some actions, like restoring the system after testing
to a default state may be assigned to tearDown
Thread Groups.
Run tearDown Thread Groups after shutdown of
main threads
CHECK BOX #3
JMeter can also be used for functional tests because
it has a set of elements which allow page retrieval
from the server.
Saves much more information about each request
using the functional test mode.
Consumes more memory for processing data stream.
Functional Test Mode
THREAD GROUPS
Every JMeter test plan should contain at least one Thread
Group and it will be the first element added to the test plan.
HTTP REQUEST DEFAULTS
Set default values for your HTTP Request controllers use:
For example, if you are creating a Test Plan with 25 HTTP
Request controllers and all of the requests are being sent to the
same server, you could add a single HTTP Request Defaults
element with the "Server Name or IP" field filled in.
Use the same URL for all requests. Add the site that will be
stress tested.
CONSTANT TIMER
Users never
click links one
by one, without
any delay.
Naturally, there is a delay between thoughts and
therefore user think-time needs to be emulated.
JMeter has a set of Timers, which allows users to set up a
pause between different requests.
Add Constant Timer to generate the delay for the fixed
amount of time.
HTTP COOKIE AND CACHE MANAGER
HTTP Cookie Manager: used for
emulating browser's work with
cookies.
HTTP Cache Manager: used for
saving downloaded pages in cache
during the first request, so they
could be returned to Listener
without downloading. This
approach, obviously, has influence
on test results.
VIEW RESULTS TREE
This element is
only needed
during debugging
tests.
View Results Tree is in regards to memory consumption because it
stores, in memory, all the results of requests.
If it is used while there are many virtual users, memory will run
out. So remove or disable the View Results Tree all other graphic
listeners before running a test.
RUNNING A LOAD TEST WITH
BLAZEMETER
•VL
If you already have your BlazeMeter account set up, you can
simply click “Add test”.
If not, create your FREE account now!
UPLOAD TEST SCRIPT
Upload the JMeter script to BlazeMeter
Adjust the test plan settings using the controls on the right side of
the page. Press SAVE. Press START.
RESULTS
WELL
DONE!
Load Report Tab
All graphs represent KPIs
(Key Performance
Indicators) measured
during the load.
THANKS YOU!
info@blazemeter.com

More Related Content

Viewers also liked

How to Cover All Your Backend Testing Needs with API and UI Tests
How to Cover All Your Backend Testing Needs with API and UI TestsHow to Cover All Your Backend Testing Needs with API and UI Tests
How to Cover All Your Backend Testing Needs with API and UI Tests
BlazeMeter
 
Testing Soap/Rest Web Services with JMeter
Testing Soap/Rest Web Services with JMeterTesting Soap/Rest Web Services with JMeter
Testing Soap/Rest Web Services with JMeter
BlazeMeter
 
JMeter
JMeterJMeter
Introduction to Jmeter
Introduction to JmeterIntroduction to Jmeter
Introduction to Jmeter
Guru99
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
PerconaPerformance
 
Using Jenkins and Jmeter to build a scalable Load Testing solution
Using Jenkins and Jmeter to build a scalable Load Testing solutionUsing Jenkins and Jmeter to build a scalable Load Testing solution
Using Jenkins and Jmeter to build a scalable Load Testing solution
Ruslan Strazhnyk
 
BlazeMeter- Effective Performance Reporting
BlazeMeter- Effective Performance ReportingBlazeMeter- Effective Performance Reporting
BlazeMeter- Effective Performance Reporting
BlazeMeter
 
JMeter Cloud Service comparison
JMeter Cloud Service comparison JMeter Cloud Service comparison
JMeter Cloud Service comparison
Tomasz Fajks
 
Using JMeter in CloudTest for Continuous Testing
Using JMeter in CloudTest for Continuous TestingUsing JMeter in CloudTest for Continuous Testing
Using JMeter in CloudTest for Continuous Testing
SOASTA
 
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
 
How to Run a 1,000,000 VU Load Test using Apache JMeter and BlazeMeter
How to Run a 1,000,000 VU Load Test using Apache JMeter and BlazeMeterHow to Run a 1,000,000 VU Load Test using Apache JMeter and BlazeMeter
How to Run a 1,000,000 VU Load Test using Apache JMeter and BlazeMeter
Alon Girmonsky
 
Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeter
jvSlideshare
 
JMeter Database Performace Testing - Keytorc Approach
JMeter Database Performace Testing - Keytorc ApproachJMeter Database Performace Testing - Keytorc Approach
JMeter Database Performace Testing - Keytorc Approach
Keytorc Software Testing Services
 
Performance testing jmeter
Performance testing jmeterPerformance testing jmeter
Performance testing jmeter
Bhojan Rajan
 

Viewers also liked (14)

How to Cover All Your Backend Testing Needs with API and UI Tests
How to Cover All Your Backend Testing Needs with API and UI TestsHow to Cover All Your Backend Testing Needs with API and UI Tests
How to Cover All Your Backend Testing Needs with API and UI Tests
 
Testing Soap/Rest Web Services with JMeter
Testing Soap/Rest Web Services with JMeterTesting Soap/Rest Web Services with JMeter
Testing Soap/Rest Web Services with JMeter
 
JMeter
JMeterJMeter
JMeter
 
Introduction to Jmeter
Introduction to JmeterIntroduction to Jmeter
Introduction to Jmeter
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
 
Using Jenkins and Jmeter to build a scalable Load Testing solution
Using Jenkins and Jmeter to build a scalable Load Testing solutionUsing Jenkins and Jmeter to build a scalable Load Testing solution
Using Jenkins and Jmeter to build a scalable Load Testing solution
 
BlazeMeter- Effective Performance Reporting
BlazeMeter- Effective Performance ReportingBlazeMeter- Effective Performance Reporting
BlazeMeter- Effective Performance Reporting
 
JMeter Cloud Service comparison
JMeter Cloud Service comparison JMeter Cloud Service comparison
JMeter Cloud Service comparison
 
Using JMeter in CloudTest for Continuous Testing
Using JMeter in CloudTest for Continuous TestingUsing JMeter in CloudTest for Continuous Testing
Using JMeter in CloudTest for Continuous Testing
 
How to Analyze Reports in Jmeter
How to Analyze Reports in JmeterHow to Analyze Reports in Jmeter
How to Analyze Reports in Jmeter
 
How to Run a 1,000,000 VU Load Test using Apache JMeter and BlazeMeter
How to Run a 1,000,000 VU Load Test using Apache JMeter and BlazeMeterHow to Run a 1,000,000 VU Load Test using Apache JMeter and BlazeMeter
How to Run a 1,000,000 VU Load Test using Apache JMeter and BlazeMeter
 
Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeter
 
JMeter Database Performace Testing - Keytorc Approach
JMeter Database Performace Testing - Keytorc ApproachJMeter Database Performace Testing - Keytorc Approach
JMeter Database Performace Testing - Keytorc Approach
 
Performance testing jmeter
Performance testing jmeterPerformance testing jmeter
Performance testing jmeter
 

Recently uploaded

Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
Pedro J. Molina
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
Paul Brebner
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptxOperational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
sandeepmenon62
 
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
dhavalvaghelanectarb
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
Zycus
 
Cost-Effective Strategies For iOS App Development
Cost-Effective Strategies For iOS App DevelopmentCost-Effective Strategies For iOS App Development
Cost-Effective Strategies For iOS App Development
Softradix Technologies
 
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
Luigi Fugaro
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdfSoftware Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
kalichargn70th171
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
kalichargn70th171
 

Recently uploaded (20)

Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptxOperational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
 
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
 
Cost-Effective Strategies For iOS App Development
Cost-Effective Strategies For iOS App DevelopmentCost-Effective Strategies For iOS App Development
Cost-Effective Strategies For iOS App Development
 
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdfSoftware Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
 
bgiolcb
bgiolcbbgiolcb
bgiolcb
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
 

Blaze meter get started scripting with jmeter

  • 1. GETTING STARTED: SCRIPTING WITH JMETER Apache JMeter is a great tool for simulating performance testing on web-applications, but it may seem tricky at first glance. Learn how to create your first JMeter script from scratch.
  • 2. GETTING STARTED • Download JMeter from the official Apache JMeter website • Unzip the distribution and copy it a folder on your computer. • You need to have JRE 1.6 or above to run JMeter, because it's written in pure JAVA. • If you are running WINDOWS- Go to $JMETER_HOME/bin and run jMeter.bat or If you are using *nix –Go to JMeter
  • 3. TEST PLAN (1) The Test Plan is the core element of the test script. 2 tables and 3check-boxes.
  • 4. TEST PLAN (2) #1 Table • User Defined Variables, allows us to set variables, which can be used in any other part of the script • These values can be set up as a variables simply eliminating the need to update the script. #2 Table • Is used for making test plan databases, in order to make the JDBC driver visible for JMeter and able to execute the SQL queries. • Add JDBC *.jar to this table, and JMeter will recognize it.
  • 5. CHECK BOX #1 If this option is checked, than all Thread Groups will be executed one by one. This may be useful in cases such as if the first Thread Group prepares test-data for a test, and the next one uses this set. Run Thread Group Consecutively
  • 6. CHECK BOX #2 Some actions, like restoring the system after testing to a default state may be assigned to tearDown Thread Groups. Run tearDown Thread Groups after shutdown of main threads
  • 7. CHECK BOX #3 JMeter can also be used for functional tests because it has a set of elements which allow page retrieval from the server. Saves much more information about each request using the functional test mode. Consumes more memory for processing data stream. Functional Test Mode
  • 8. THREAD GROUPS Every JMeter test plan should contain at least one Thread Group and it will be the first element added to the test plan.
  • 9. HTTP REQUEST DEFAULTS Set default values for your HTTP Request controllers use: For example, if you are creating a Test Plan with 25 HTTP Request controllers and all of the requests are being sent to the same server, you could add a single HTTP Request Defaults element with the "Server Name or IP" field filled in. Use the same URL for all requests. Add the site that will be stress tested.
  • 10. CONSTANT TIMER Users never click links one by one, without any delay. Naturally, there is a delay between thoughts and therefore user think-time needs to be emulated. JMeter has a set of Timers, which allows users to set up a pause between different requests. Add Constant Timer to generate the delay for the fixed amount of time.
  • 11. HTTP COOKIE AND CACHE MANAGER HTTP Cookie Manager: used for emulating browser's work with cookies. HTTP Cache Manager: used for saving downloaded pages in cache during the first request, so they could be returned to Listener without downloading. This approach, obviously, has influence on test results.
  • 12. VIEW RESULTS TREE This element is only needed during debugging tests. View Results Tree is in regards to memory consumption because it stores, in memory, all the results of requests. If it is used while there are many virtual users, memory will run out. So remove or disable the View Results Tree all other graphic listeners before running a test.
  • 13. RUNNING A LOAD TEST WITH BLAZEMETER •VL If you already have your BlazeMeter account set up, you can simply click “Add test”. If not, create your FREE account now!
  • 14. UPLOAD TEST SCRIPT Upload the JMeter script to BlazeMeter Adjust the test plan settings using the controls on the right side of the page. Press SAVE. Press START.
  • 15. RESULTS WELL DONE! Load Report Tab All graphs represent KPIs (Key Performance Indicators) measured during the load.