SlideShare ist ein Scribd-Unternehmen logo
1 von 77
Downloaden Sie, um offline zu lesen
JmeterTool
Chapter 1
Introduction
Overview of PerformanceTesting
Performance testing is an non-functional testing to determine the
system responsiveness i.e. speed, stability, reliability and scalability.
Speed Throughput
Reliability Scalability
Purpose of Performance Testing
Performance Testing ensures that your application works under
real-world loads before your customers find out that it doesn't!
GOAL/OBJECTIVE IS TO FIND THE BOTTLE NECK IN THE SYSTEM
KeyTypes of Performance Testing
Load Testing
Focus: “Response Time”
Stress Testing
Focus: “Response Time” and “Throughput"
Endurance Testing
Focus: “Memory”
Volume/Capacity
Testing
Focus: “Response Time”
Scalable Testing
Focus: “Response Time” and “Throughput"
Goal of Performance Testing
 Access the Production Readiness.
 Compare two platforms with the same software to see which
performs better.
 Compare Performance characteristics of system configurations.
 Evaluate System against performance criteria.
 Discover what parts of the application perform poorly and under
what conditions.
 Finding the source of performance problems.
 Support system tuning.
Pre-Requisites PerformanceTesting
 Stable and defect-free dedicated environment.
 Performance testing environment similar to production
environment.
 No other testing should be performed while Performance Testing.
 Performance testing before going live.
 Performance testing plan development.
 Test Data Preparation.
 Performance testing requirements gathering.
 Application architecture.
 Servers information.
 Application usage information.
 Performance Acceptance criteria.
Performance Management
There are two approaches of managing the performance testing
activities:
Reactive Approach
Performance is only done after the System testing.
Proactive Approach
Performance parameter is analyzed and addressed in testing
environment before it really impact the production system and fix
it before launching the application.
 Non-Functional Requirements Gathering phase
 Design phase Development phase
 Development phase
 Test Execution phase
 Maintenance
Performance Testing Life Cycle
Typical Performance testing cycle consists of following activities:
1.Establish Performance Test Objectives
2.Prepare test environment
3.Create and modify scripts
4.Execute Performance test
5.Monitor impact of load on servers/databases.
6.Analyze results
7.Tune system
8.Repeat from Step 4
9.Deploy mission critical application with confidence.
Why to use performance Testing
tool?
 Almost impossible without one!
 Without tool relies on massive hardware and personnel to
generate load.
The cost of repeating a 'manual' test never diminishes.
Without a tool, no end reports are created.
 Reponses Time
 CPU Utilization
 Disk I/O
 Network I/O
 Other
Performance Symptoms and Issues
Application Server
 Poor database tuning.
 Poor cache management.
 Poor session management.
Web Server
 Poor server design.
 Poor configuration & usage.
Database Server
 Insufficient indexing.
 Fragmented databases.
 Faulty application design.
Network
 Firewall throughput.
 Load balancers, gateways,
routers.
Client Side
 Browser settings.
 Client system.
Typical order of Fixes
 Improve current application design: Algorithms, caching, DB
calls, memory use
 Upgrade hardware: RAM, CPU, network bandwidth
 Upgrade software infrastructure: OS, web server, database
(database connection polling)
 Upgrade system architecture: Client-server to basic n-tier, basic
n-tier to enterprise n-tier, software and hardware changes, Use
Apache HTTPD in front of Tomcat to serve static resources,
Use hardware load balancing /SSL.
Challenged with Performance
Testing
Following is a list of challenges with Performance Testing:
 Test environment setup
 Collection and Analysis of huge data
 Bottleneck root cause identification
 Obtaining accurate results
 Client involvement
 Testing inside the firewall
 Performance testing of new technologies
 Testing on live environment
 Expensive
 Cooperative effort required (Product vendors, Architects,
Developers, Testers, Database administrators, System
administrators, Network administrators)
PerformanceTesting Best Practices
 Use user Ramp up and Ramp down approach.
 Ignore the results collected during Ramp up and Ramp down
periods.
 Run individual tests of performance scenarios before combining
them in a single test.
 Run a baseline test with single user to validate the script.
 Run a benchmark test with 15 to 20 percent of desired load
to validate the system matrices at lower load and check the
system readiness for high load.
 Run the test for at least 10-15 minutes at stable peak load.
 Repeat tests at least 3 times to confirm the results.
 Run tests at different times.
Chapter 2
Get Started
What is Jmeter?
 Open source tool
 Friendly GUI Design
 Platform Independent
 Full multithreading framework
 Visualize Test Results
 Easy Installation
 Support multi-protocol
Jmeter Works:
Send request to
target server
Get statistics
information of
target server
Generate test
report in different
format
What can you test in Jmeter?
 Can load and performance test many different server types:
 Web - HTTP, HTTPS
 SOAP
 Database via JDBC
 LDAP
 JMS
 Mail - POP3(S) and IMAP(S)
Installing Jmeter
 Install Java (2.2. or higher)
 Download JMeter
http://jakarta.apache.org/site/downloads/index.html
 Add path of java installation in environment path variables.
Setting up Environment
Jmeter have simple environment:
Running JMeter
 Open command prompt (user administrative mode to avoid
unnecessary hassle).
 Traverse to [Jmeter installation path]bin
 Run Jmeter.bat
Chapter 3
Introduction to
Elements of Jmeter
Test Plan
Test Plan
 Test plan node is where REAL stuff is kept.
 Used for containing the test.
 A layout of how and what to test.
 Test Plan describe a series of steps JMeter will execute once
the Test Plan runs.
 A test plan must have at least one Thread Group.
Thread Group
 Thread Group is used for representing users.
 There could be one or more Thread Groups in a Test Plan.
 Each thread group will execute completely independently from
each other.
 Thread Group can control:
 Number of users simulated (No. of threads).
 Ramp Up time (how long it takes to start all the threads).
 Number of times to perform the test.
Controllers
 Controllers used for grouping and applying logic to test items.
 It’s of two types:
Controllers
Sampler (Send Request to Server)
Logical Controller (Customize logic to
send request)
Samplers
 Used for performing actual task.
 It allow JMeter to send specific types of requests to a server.
 The following is a list of all Samplers JMeter provides:
Sampler
HTTP
Request
FTP
Request
JDBC
Request
Web
Service
(SOAP)
Request
Access
Log
Sampler
Bean
Shell
Sampler
BSF
Sampler
TCP
Sampler
Logic Controllers
 These allow you to customize the logic that JMeter uses to
decide when to send requests.
 The following list consists of all the Logic Controllers JMeter
provides:
Logic Controller
Simple
Controller
Loop
Controller
Once Only
Controller
Random
Controller
Throughput
Controller
If Controller While
Controller
Switch
Controller
Transaction
Controller
Recording
Controller
Listeners
 Listeners are used for displaying of data.
 Listeners provide means to view, save, and read saved test
results.
 The following list consists of all the Listeners JMeter provides:
Listeners
Graph Full
Results
Spline
Visualizer
Assertion
Results
View
Results
Tree
Aggregate
Report
View
Results in
Table
Aggregate
Graph
Timers
 Allow JMeter to delay between each request that a thread
makes.
 Think Time is used for emulating real-life visitors/users.
 The following list consists of all the Timers JMeter provides:
Timer
Constant
Timer
Uniform
Random
Timer
Gaussian
Random
Timer
Synchronizing
Timer
Bean Shell
Time
Assertions
 Used for Validating Test.
 Allow you to "test" that your application is returning the
results you expect it to.
 The following list consists of all the Assertions JMeter
provides:
Assertion
Response
Assertion
Duration
Assertion
Size
Assertion
Bean
Shell
Assertion
HTML
Assertion
XPath
Assertion
Configuration Elements
 They are used to add or modify requests made by Samplers.
 They Works closely with a Sampler, these can add to or
modify requests.
 The following list consists of all the Configuration Elements
JMeter provides:
Configuration Element
CSV Data Set
Config
FTP Request
Defaults
HTTP
Authorization
Manager
HTTP Cookie
Manager
HTTP Request
Defaults
JDBC
Connection
Configuration
Login Config
Element
Pre-Processor Elements
 They Execute prior to sampler request
 It's used to modify the settings of a Sample Request just
before it runs.
 The following list consists of all the Pre-Processor Elements
JMeter provides:
Pre-Processor Element
HTML Link
Parser
HTTP URL Re-
writing
Modifier
User
Parameters
Bean Shell
PreProcessor
Post-Processor Elements
 They Execute some action after sampler request.
 It's execute after a request has been made from a Sampler.
 The following list consists of all the Post-Processor Elements
JMeter provides:
Post-Processor Element
Regular
Expression
Extractor
XPath
Extractor
Save Responses
to a file
Bean Shell
PostProcessor
Chapter 4
Building a Web Test
Plan
Recording & Playback
 Jmeter can act as a proxy server between your browser and
the web recording your actions.
 This can help in writing your web tests.
 Lets do another small demo?
◦ Proxy Server
◦ Script Recoding Tool (Badboy, Wireshark)
Adding Users
 5 users send 2 requests on jmeter.apache.org and repeat it
twice. (5 users x 2 requests x 2 repeat = 20 requests)
 Right click on test note >> Add >> Thread (users) >> Thread
Group.
Adding Default HTTP Request
Properties
 This will let you define default http parameter for every
request.
 You can add default http request setting from ADD > Config
Element > HTTP request default.
Adding HTTP Requests
 You can add it from ADD > Sampler > HTTP Request
Adding Cookie Support
 They are normally included to maintains a certain state for
each user, e.g. cookies.
 You can add it from ADD > Config Element > HTTP Cookie
Manager.
Adding a Listener toView/Store the
Test Results
 Listener responsible for storing all of the results of our HTTP
request and presenting in Visualize mode.
 You can add it from ADD > Listener > Summary Report.
Chapter 5
Load/Performance
Testing of Websites
Preparing for Load Testing
 Need to address a number of concerns with regards to the
target server under test.
 A load testing helps to benchmark performance behavior of a
server, it is important to be able to identify the general
expectations and other matters that would normally be taken
into account in order to carry out a successful load testing.
Need to Know
 A suitable time to load-test the application, for instance when
no development work is taking place on the server and/or no
other users are accessing the server.
 The performance metrics, accepted levels, or SLAs and goals.
 Objectives of the test.
 The Internet protocol(s) the application is(are) using (HTTPS,
HTTP, FTP, etc.)
 If your application has a state, the method used to manage it
(URL rewriting, cookies, etc.)
 The workload at normal time and at peak time.
Some HelpfulTips to Get Better
Results
 Use meaningful test scenarios to construct 'real-life' test cases.
 Run JMeter on a machine other than that running the
application.
 The machine running JMeter should have sufficient network
bandwidth, memory, CPU to generate load.
 Let JMeter Test Plan run for long time periods, hours or
days, or for a large number of iterations.
 Ensure that the application is stable and optimized for one
user before testing it for concurrent users.
 Incorporate 'thinking time' or delays using Timers in your
JMeter Test Plan.
 Keep a close watch on the four main things: processor,
memory, disk, and network.
Using Jmeter Components
 We will test five key scenarios:-
 Homepage
 Keyword Search
 Create Account
 Select A Title
 Add To Cart
These scenarios will be included in a single JMeter Test Plan, for
simplicity reasons.
Recording HTTP Requests
 JMeter Proxy can use to record all request send to server.
 Create test plan with default http testing
 Add HTTP Proxy Server in Workbench node.
 Define port number of proxy server
Creating the Test Plan
 Right-click on the Test Plan element and select Add | Thread
Group.
 Configure the Number of Threads to 10, Ramp-Up Period to 1
second, and Loop Count to 50.
 Add to the Test Plan Config Element | HTTP Request
Defaults.
 Add Pre-Processor | User Parameter Element or Config
Element | CSV Data Set Config.
Adding Listeners
 Right click Thread Group node > Add > Listener.
Running the Test Plan
 When Jmeter script gets ready.
 Click on “Start”.
Interpreting the Results
 Once the test is completed, we can now retrieve the results
we have saved for each Controller.
 With the exception of the Assertion Result Listener, the saved
data can be viewed in numerous forms.
Monitoring the Server's
Performance
 There is a special Listener that allows you to monitor the
target server's performance as Samplers make requests.
 This Monitor Result Listener is designed to work with Apache
Tomcat version 5 and above.
 Some server monitoring tools:
 Perfmon
 Blazemeter
Chapter 6
Handling the
dynamic server
values
What is Correlation
 A Correlation is a Connection or Association.
 Capturing the dynamic data that is being generated by the
server is called correlation.
 Correlation will be done using the Regular Expression
Extractor in Jmeter.
Why Correlation
 To overcome script fail we need a way which can capture these
dynamically generated session values and pass it subsequently
to any part of the script, wherever required. This method to
identify and set the dynamic generated value is known as
correlation.
Sample of Regular Expression and Usage:
Session ID = (.+?)  to correlate the url/dynamic id.
EX: Session ID = jkjoujn434897h3jh35y9h&OrderID=ikikikke99874kmnjhh2
Using Regular Expression Extractor
in Jmeter Tests
 Regular expressions are used to search and manipulate text,
based on patterns.
 This element will extract text from the current page using a
Regular Expression to identify the text pattern that a desired
element conforms with.
 Right click the node > Add > Post Processor > Regular
Expression Extractor
Chapter 7
Parameterize with test
data
What is Parameterization
 It is the way of replacing a hard coded value in the script with
a parameter which represents a list of values.
 It is a script that contains the actual values used during
recording and during script enhancement phase test engineer
has to replace the recorded values with parameters is known as
parameterizing the script.
Why Parameterize
 It allows you to test your script with different values.
 Replace the constant values in Script with parameters.
 simulate real user behavior while running the test
Identifying the test data on AUT
 While login “Username” & “Password” are parameter for which
test data needed.
 While registration “First Name”, “City” etc. is parameter for
which test data needed.
Using the CSV Data Config in
Jmeter Tests
 Create CSV file with list of username and password.
 Store in same folder where your test stores.
 Add CSV Data set into your test tree from config elements.
 Add ${username},${password} in request sampler as parameter.
Chapter 8
Adding Assertions to
the test script
What is Assertion
 Assertions allow you to include some validation test on the
response.
 To ensure the responses you receive.
Why Assertion
 Assertions are used to perform additional checks on samplers.
 They are processed after every sampler in the same scope.
Types of Assertion in Jmeter
 Response Assertion: Compared against various fields of response.
 Duration Assertion: Tests each response was received within a
given amount of time.
 Size Assertion: Tests each response contains the right number
of bytes in it.
 XML Assertion: Tests response data consists of a formally
correct XML document.
 BeanShell Assertion: Checking using a BeanShell script.
 MD5Hex Assertion: Check the MD5 hash of the response data.
 HTML Assertion: Check the HTML syntax of the response.
 XPath Assertion: Tests a document for well formedness.
 XML Schema Assertion: The XML Schema Assertion allows the
user to validate a response against an XML Schema.
Running the tests and analyzing the
Assertion results
 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.
Chapter 9
Advanced Features
Testing a Database Server
 A few things you will need before proceeding to build a
Database Test Plan are:
 A working database driver, copy the .jar file contained in the
database driver and pastes it in the lib folder of your JMeter.
 A valid database-schema.
 Valid non-empty database table(s).
 A valid user-level access to the database.
Testing an FTP Server
 What you will need before proceeding to build a FTP Test Plan
includes:
 A running FTP server on the target machine.
 A valid path to the shared files in your FTP server.
 Valid non-empty files in the FTP installation path.
 A valid user-level access to the files.
Chapter 10
Best Practices
Reducing resource requirements
 Do not use GUI mode better use non-GUI mode.
 Use Remote and Distributed testing for larger load testing.
 Do not load more than 300 threads per Jmeter.
 Use naming conventions for all the elements.
 Use as few Listeners as possible.
 Don't use "View Results Tree" or "View Results in Table"
listeners during the load test; use them only during scripting
phase to debug your scripts.
 Rather than using lots of similar samplers, use the same
sampler in a loop, and use variables (CSV Data Set) to vary
the sample.
 Use CSV output rather than XML.
 Only save the data that you need.
 Use as few Assertions as possible.
Where to Put the Cookie Manager
 The cookie manager stores and sends cookies just like a web
browser.
 Received Cookies can be stored as JMeter thread variables.
 Manually add a cookie to the Cookie Manager.
Where to Put the Authorization
Manager
 It’s specify one or more user logins for web pages that are
restricted using server authentication.
Bean Shell Server
 The Bean Shell interpreter has a very useful feature it can act
as a server, which is accessible by telnet or http.
Distributed Testing
 Master: The system running Jmeter GUI which control the test.
 Slave: The System running Jmeter-server which takes commends
from the GUI and send the requests to the target system.
 Target: The Web Server planned for the load test.
 JMeter client machine may not able to simulate enough users to
stress server.
 Control multiple machine to run JMeter without copying test
samples to different machine.
Sever Monitoring Tools (PerfMon)
 During a load test, it is important to know the health of the
servers loaded.
 To address this, the plugin package now supports server
monitoring!
 Detail Link:
https://code.google.com/p/jmeter-plugins/wiki/PerfMon
Database Monitoring Tool (Jet
Profiler)
 Jet Profiler for MySQL is a query profiling tool for the
MySQL database server.
 Query, table and user performance
 Graphical Visualization
 Low overhead
 User friendly
 Detail Link:
http://www.jetprofiler.com/
Request Snipers Tools
 It’s to monitors and analyzes all incoming and outgoing HTTP
traffic between the browser and the web servers.
 HttpFox
 httpwatch
 Gtmetrix
 Yslow
 Web Page Test
 google speed test
Thank you

Weitere ähnliche Inhalte

Was ist angesagt?

Apache Jmeter 3.2 Performance & Load Testing 2017
Apache Jmeter 3.2 Performance & Load Testing 2017Apache Jmeter 3.2 Performance & Load Testing 2017
Apache Jmeter 3.2 Performance & Load Testing 2017Shay Ginsbourg
 
Jmeter interviewquestions
Jmeter interviewquestionsJmeter interviewquestions
Jmeter interviewquestionsgirichinna27
 
How we can measure server performance using jmeter?
How we can measure server performance using jmeter?How we can measure server performance using jmeter?
How we can measure server performance using jmeter?BugRaptors
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeterlethibichhoa
 
Performance testing using jmeter
Performance testing using jmeterPerformance testing using jmeter
Performance testing using jmeterRachappa Bandi
 
How to Simplify Load Testing: JMeter and Beyond
How to Simplify Load Testing: JMeter and BeyondHow to Simplify Load Testing: JMeter and Beyond
How to Simplify Load Testing: JMeter and BeyondAndrey Pokhilko
 
Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Shivakumara .
 
Performance Testing using Jmeter and Capacity Testing
Performance Testing using Jmeter and Capacity TestingPerformance Testing using Jmeter and Capacity Testing
Performance Testing using Jmeter and Capacity TestingAkshay Patole
 
Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeterjvSlideshare
 
JMeter - Performance testing your webapp
JMeter - Performance testing your webappJMeter - Performance testing your webapp
JMeter - Performance testing your webappAmit Solanki
 
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
 
JMeter Interview Questions | Performance Testing Interview Questions | Edureka
JMeter Interview Questions | Performance Testing Interview Questions | EdurekaJMeter Interview Questions | Performance Testing Interview Questions | Edureka
JMeter Interview Questions | Performance Testing Interview Questions | EdurekaEdureka!
 
JMeter Post-Processors
JMeter Post-ProcessorsJMeter Post-Processors
JMeter Post-ProcessorsLoadium
 
Introduction to jmeter & how to view jmeter Test Result in Real-Time
Introduction to jmeter & how to view jmeter Test Result in Real-TimeIntroduction to jmeter & how to view jmeter Test Result in Real-Time
Introduction to jmeter & how to view jmeter Test Result in Real-TimeBugRaptors
 
Performance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introPerformance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introMykola Kovsh
 
Performance testing with JMeter
Performance testing with JMeterPerformance testing with JMeter
Performance testing with JMeterMikael Kundert
 

Was ist angesagt? (20)

Apache Jmeter 3.2 Performance & Load Testing 2017
Apache Jmeter 3.2 Performance & Load Testing 2017Apache Jmeter 3.2 Performance & Load Testing 2017
Apache Jmeter 3.2 Performance & Load Testing 2017
 
Jmeter interviewquestions
Jmeter interviewquestionsJmeter interviewquestions
Jmeter interviewquestions
 
How we can measure server performance using jmeter?
How we can measure server performance using jmeter?How we can measure server performance using jmeter?
How we can measure server performance using jmeter?
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeter
 
Performance testing using jmeter
Performance testing using jmeterPerformance testing using jmeter
Performance testing using jmeter
 
How to Simplify Load Testing: JMeter and Beyond
How to Simplify Load Testing: JMeter and BeyondHow to Simplify Load Testing: JMeter and Beyond
How to Simplify Load Testing: JMeter and Beyond
 
Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02
 
Performance Testing using Jmeter and Capacity Testing
Performance Testing using Jmeter and Capacity TestingPerformance Testing using Jmeter and Capacity Testing
Performance Testing using Jmeter and Capacity Testing
 
Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeter
 
JMeter - Performance testing your webapp
JMeter - Performance testing your webappJMeter - Performance testing your webapp
JMeter - Performance testing your webapp
 
Apache jMeter
Apache jMeterApache jMeter
Apache jMeter
 
J Meter Intro
J Meter IntroJ Meter Intro
J Meter Intro
 
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
 
Load testing jmeter
Load testing jmeterLoad testing jmeter
Load testing jmeter
 
JMeter Interview Questions | Performance Testing Interview Questions | Edureka
JMeter Interview Questions | Performance Testing Interview Questions | EdurekaJMeter Interview Questions | Performance Testing Interview Questions | Edureka
JMeter Interview Questions | Performance Testing Interview Questions | Edureka
 
Jmeter From Scratch
Jmeter From ScratchJmeter From Scratch
Jmeter From Scratch
 
JMeter Post-Processors
JMeter Post-ProcessorsJMeter Post-Processors
JMeter Post-Processors
 
Introduction to jmeter & how to view jmeter Test Result in Real-Time
Introduction to jmeter & how to view jmeter Test Result in Real-TimeIntroduction to jmeter & how to view jmeter Test Result in Real-Time
Introduction to jmeter & how to view jmeter Test Result in Real-Time
 
Performance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introPerformance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter intro
 
Performance testing with JMeter
Performance testing with JMeterPerformance testing with JMeter
Performance testing with JMeter
 

Ähnlich wie Performancetestingjmeter 131210111657-phpapp02

Performance testing jmeter
Performance testing jmeterPerformance testing jmeter
Performance testing jmeterBhojan Rajan
 
Performance testing and j meter
Performance testing and j meterPerformance testing and j meter
Performance testing and j meterPurna Chandar
 
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 & ColdFusion
JMeter & ColdFusion JMeter & ColdFusion
JMeter & ColdFusion isummation
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance TestingAtul Pant
 
Less11 3 e_loadmodule_1
Less11 3 e_loadmodule_1Less11 3 e_loadmodule_1
Less11 3 e_loadmodule_1Suresh Mishra
 
Performance testing with Jmeter
Performance testing with JmeterPerformance testing with Jmeter
Performance testing with JmeterPrashanth Kumar
 
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
 
Elments Used on Jmeter
Elments Used on JmeterElments Used on Jmeter
Elments Used on JmeterViviana Lesmes
 
Automation - Apache JMeter
Automation - Apache JMeterAutomation - Apache JMeter
Automation - Apache JMeterWira Santos
 
Apachejmeterabriefintroduction
ApachejmeterabriefintroductionApachejmeterabriefintroduction
ApachejmeterabriefintroductionForedoomed
 
"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
 
Performance Testing With Jmeter
Performance Testing With JmeterPerformance Testing With Jmeter
Performance Testing With JmeterAdam Goucher
 
Basic of jMeter
Basic of jMeter Basic of jMeter
Basic of jMeter Shub
 
Software testing
Software testingSoftware testing
Software testingnil65
 
J meter introduction
J meter introductionJ meter introduction
J meter introductionBharath Kumar
 

Ähnlich wie Performancetestingjmeter 131210111657-phpapp02 (20)

Performance testing jmeter
Performance testing jmeterPerformance testing jmeter
Performance testing jmeter
 
Performance testing and j meter
Performance testing and j meterPerformance testing and j meter
Performance testing and j meter
 
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-SKILLWISE
JMETER-SKILLWISEJMETER-SKILLWISE
JMETER-SKILLWISE
 
JMeter Intro
JMeter IntroJMeter Intro
JMeter Intro
 
JMeter & ColdFusion
JMeter & ColdFusion JMeter & ColdFusion
JMeter & ColdFusion
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
 
Less11 3 e_loadmodule_1
Less11 3 e_loadmodule_1Less11 3 e_loadmodule_1
Less11 3 e_loadmodule_1
 
Performance testing with Jmeter
Performance testing with JmeterPerformance testing with Jmeter
Performance testing with Jmeter
 
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)
 
Elments Used on Jmeter
Elments Used on JmeterElments Used on Jmeter
Elments Used on Jmeter
 
Automation - Apache JMeter
Automation - Apache JMeterAutomation - Apache JMeter
Automation - Apache JMeter
 
jmeter interview q.pdf
jmeter interview q.pdfjmeter interview q.pdf
jmeter interview q.pdf
 
Apachejmeterabriefintroduction
ApachejmeterabriefintroductionApachejmeterabriefintroduction
Apachejmeterabriefintroduction
 
"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session
 
Performance Testing With Jmeter
Performance Testing With JmeterPerformance Testing With Jmeter
Performance Testing With Jmeter
 
Basic of jMeter
Basic of jMeter Basic of jMeter
Basic of jMeter
 
Software testing
Software testingSoftware testing
Software testing
 
J meter introduction
J meter introductionJ meter introduction
J meter introduction
 

Mehr von Nitish Bhardwaj

Mehr von Nitish Bhardwaj (20)

Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Docx document
Docx documentDocx document
Docx document
 
Doc1x
Doc1xDoc1x
Doc1x
 
10 Famous Quotes on Sachin Tendulkar
10 Famous Quotes on Sachin Tendulkar10 Famous Quotes on Sachin Tendulkar
10 Famous Quotes on Sachin Tendulkar
 
Check the latest tool
Check the latest toolCheck the latest tool
Check the latest tool
 
Presentation 2
Presentation 2Presentation 2
Presentation 2
 
Docx document
Docx documentDocx document
Docx document
 
Do1c
Do1cDo1c
Do1c
 
Doc1x
Doc1xDoc1x
Doc1x
 
Internet of-things-slideshare-140819153732-phpapp01
Internet of-things-slideshare-140819153732-phpapp01Internet of-things-slideshare-140819153732-phpapp01
Internet of-things-slideshare-140819153732-phpapp01
 
Adrianalimabikinibodyworkoutdietplan
AdrianalimabikinibodyworkoutdietplanAdrianalimabikinibodyworkoutdietplan
Adrianalimabikinibodyworkoutdietplan
 
Drivepresent 140702005121-phpapp01
Drivepresent 140702005121-phpapp01Drivepresent 140702005121-phpapp01
Drivepresent 140702005121-phpapp01
 
Drivepresent 140702005121-phpapp01
Drivepresent 140702005121-phpapp01Drivepresent 140702005121-phpapp01
Drivepresent 140702005121-phpapp01
 
Drivepresent 140702005121-phpapp01
Drivepresent 140702005121-phpapp01Drivepresent 140702005121-phpapp01
Drivepresent 140702005121-phpapp01
 
Beautifulplanetearthafrica 140801155400-phpapp01
Beautifulplanetearthafrica 140801155400-phpapp01Beautifulplanetearthafrica 140801155400-phpapp01
Beautifulplanetearthafrica 140801155400-phpapp01
 
Ppt1x present
Ppt1x presentPpt1x present
Ppt1x present
 
Nbhardwa w7n1
Nbhardwa w7n1Nbhardwa w7n1
Nbhardwa w7n1
 
Hadoop 130419075715-phpapp02(1)
Hadoop 130419075715-phpapp02(1)Hadoop 130419075715-phpapp02(1)
Hadoop 130419075715-phpapp02(1)
 
Do1c
Do1cDo1c
Do1c
 
Doc1x
Doc1xDoc1x
Doc1x
 

Kürzlich hochgeladen

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
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 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
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 businesspanagenda
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
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 DevelopmentsTrustArc
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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 WoodJuan lago vázquez
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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 RobisonAnna Loughnan Colquhoun
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Kürzlich hochgeladen (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Performancetestingjmeter 131210111657-phpapp02

  • 3. Overview of PerformanceTesting Performance testing is an non-functional testing to determine the system responsiveness i.e. speed, stability, reliability and scalability. Speed Throughput Reliability Scalability
  • 4. Purpose of Performance Testing Performance Testing ensures that your application works under real-world loads before your customers find out that it doesn't! GOAL/OBJECTIVE IS TO FIND THE BOTTLE NECK IN THE SYSTEM
  • 5. KeyTypes of Performance Testing Load Testing Focus: “Response Time” Stress Testing Focus: “Response Time” and “Throughput" Endurance Testing Focus: “Memory” Volume/Capacity Testing Focus: “Response Time” Scalable Testing Focus: “Response Time” and “Throughput"
  • 6. Goal of Performance Testing  Access the Production Readiness.  Compare two platforms with the same software to see which performs better.  Compare Performance characteristics of system configurations.  Evaluate System against performance criteria.  Discover what parts of the application perform poorly and under what conditions.  Finding the source of performance problems.  Support system tuning.
  • 7. Pre-Requisites PerformanceTesting  Stable and defect-free dedicated environment.  Performance testing environment similar to production environment.  No other testing should be performed while Performance Testing.  Performance testing before going live.  Performance testing plan development.  Test Data Preparation.  Performance testing requirements gathering.  Application architecture.  Servers information.  Application usage information.  Performance Acceptance criteria.
  • 8. Performance Management There are two approaches of managing the performance testing activities: Reactive Approach Performance is only done after the System testing. Proactive Approach Performance parameter is analyzed and addressed in testing environment before it really impact the production system and fix it before launching the application.  Non-Functional Requirements Gathering phase  Design phase Development phase  Development phase  Test Execution phase  Maintenance
  • 9. Performance Testing Life Cycle Typical Performance testing cycle consists of following activities: 1.Establish Performance Test Objectives 2.Prepare test environment 3.Create and modify scripts 4.Execute Performance test 5.Monitor impact of load on servers/databases. 6.Analyze results 7.Tune system 8.Repeat from Step 4 9.Deploy mission critical application with confidence.
  • 10. Why to use performance Testing tool?  Almost impossible without one!  Without tool relies on massive hardware and personnel to generate load. The cost of repeating a 'manual' test never diminishes. Without a tool, no end reports are created.  Reponses Time  CPU Utilization  Disk I/O  Network I/O  Other
  • 11. Performance Symptoms and Issues Application Server  Poor database tuning.  Poor cache management.  Poor session management. Web Server  Poor server design.  Poor configuration & usage. Database Server  Insufficient indexing.  Fragmented databases.  Faulty application design. Network  Firewall throughput.  Load balancers, gateways, routers. Client Side  Browser settings.  Client system.
  • 12. Typical order of Fixes  Improve current application design: Algorithms, caching, DB calls, memory use  Upgrade hardware: RAM, CPU, network bandwidth  Upgrade software infrastructure: OS, web server, database (database connection polling)  Upgrade system architecture: Client-server to basic n-tier, basic n-tier to enterprise n-tier, software and hardware changes, Use Apache HTTPD in front of Tomcat to serve static resources, Use hardware load balancing /SSL.
  • 13. Challenged with Performance Testing Following is a list of challenges with Performance Testing:  Test environment setup  Collection and Analysis of huge data  Bottleneck root cause identification  Obtaining accurate results  Client involvement  Testing inside the firewall  Performance testing of new technologies  Testing on live environment  Expensive  Cooperative effort required (Product vendors, Architects, Developers, Testers, Database administrators, System administrators, Network administrators)
  • 14. PerformanceTesting Best Practices  Use user Ramp up and Ramp down approach.  Ignore the results collected during Ramp up and Ramp down periods.  Run individual tests of performance scenarios before combining them in a single test.  Run a baseline test with single user to validate the script.  Run a benchmark test with 15 to 20 percent of desired load to validate the system matrices at lower load and check the system readiness for high load.  Run the test for at least 10-15 minutes at stable peak load.  Repeat tests at least 3 times to confirm the results.  Run tests at different times.
  • 16. What is Jmeter?  Open source tool  Friendly GUI Design  Platform Independent  Full multithreading framework  Visualize Test Results  Easy Installation  Support multi-protocol Jmeter Works: Send request to target server Get statistics information of target server Generate test report in different format
  • 17. What can you test in Jmeter?  Can load and performance test many different server types:  Web - HTTP, HTTPS  SOAP  Database via JDBC  LDAP  JMS  Mail - POP3(S) and IMAP(S)
  • 18. Installing Jmeter  Install Java (2.2. or higher)  Download JMeter http://jakarta.apache.org/site/downloads/index.html  Add path of java installation in environment path variables.
  • 19. Setting up Environment Jmeter have simple environment:
  • 20. Running JMeter  Open command prompt (user administrative mode to avoid unnecessary hassle).  Traverse to [Jmeter installation path]bin  Run Jmeter.bat
  • 21. Chapter 3 Introduction to Elements of Jmeter Test Plan
  • 22. Test Plan  Test plan node is where REAL stuff is kept.  Used for containing the test.  A layout of how and what to test.  Test Plan describe a series of steps JMeter will execute once the Test Plan runs.  A test plan must have at least one Thread Group.
  • 23. Thread Group  Thread Group is used for representing users.  There could be one or more Thread Groups in a Test Plan.  Each thread group will execute completely independently from each other.  Thread Group can control:  Number of users simulated (No. of threads).  Ramp Up time (how long it takes to start all the threads).  Number of times to perform the test.
  • 24. Controllers  Controllers used for grouping and applying logic to test items.  It’s of two types: Controllers Sampler (Send Request to Server) Logical Controller (Customize logic to send request)
  • 25. Samplers  Used for performing actual task.  It allow JMeter to send specific types of requests to a server.  The following is a list of all Samplers JMeter provides: Sampler HTTP Request FTP Request JDBC Request Web Service (SOAP) Request Access Log Sampler Bean Shell Sampler BSF Sampler TCP Sampler
  • 26. Logic Controllers  These allow you to customize the logic that JMeter uses to decide when to send requests.  The following list consists of all the Logic Controllers JMeter provides: Logic Controller Simple Controller Loop Controller Once Only Controller Random Controller Throughput Controller If Controller While Controller Switch Controller Transaction Controller Recording Controller
  • 27. Listeners  Listeners are used for displaying of data.  Listeners provide means to view, save, and read saved test results.  The following list consists of all the Listeners JMeter provides: Listeners Graph Full Results Spline Visualizer Assertion Results View Results Tree Aggregate Report View Results in Table Aggregate Graph
  • 28. Timers  Allow JMeter to delay between each request that a thread makes.  Think Time is used for emulating real-life visitors/users.  The following list consists of all the Timers JMeter provides: Timer Constant Timer Uniform Random Timer Gaussian Random Timer Synchronizing Timer Bean Shell Time
  • 29. Assertions  Used for Validating Test.  Allow you to "test" that your application is returning the results you expect it to.  The following list consists of all the Assertions JMeter provides: Assertion Response Assertion Duration Assertion Size Assertion Bean Shell Assertion HTML Assertion XPath Assertion
  • 30. Configuration Elements  They are used to add or modify requests made by Samplers.  They Works closely with a Sampler, these can add to or modify requests.  The following list consists of all the Configuration Elements JMeter provides: Configuration Element CSV Data Set Config FTP Request Defaults HTTP Authorization Manager HTTP Cookie Manager HTTP Request Defaults JDBC Connection Configuration Login Config Element
  • 31. Pre-Processor Elements  They Execute prior to sampler request  It's used to modify the settings of a Sample Request just before it runs.  The following list consists of all the Pre-Processor Elements JMeter provides: Pre-Processor Element HTML Link Parser HTTP URL Re- writing Modifier User Parameters Bean Shell PreProcessor
  • 32. Post-Processor Elements  They Execute some action after sampler request.  It's execute after a request has been made from a Sampler.  The following list consists of all the Post-Processor Elements JMeter provides: Post-Processor Element Regular Expression Extractor XPath Extractor Save Responses to a file Bean Shell PostProcessor
  • 33. Chapter 4 Building a Web Test Plan
  • 34. Recording & Playback  Jmeter can act as a proxy server between your browser and the web recording your actions.  This can help in writing your web tests.  Lets do another small demo? ◦ Proxy Server ◦ Script Recoding Tool (Badboy, Wireshark)
  • 35. Adding Users  5 users send 2 requests on jmeter.apache.org and repeat it twice. (5 users x 2 requests x 2 repeat = 20 requests)  Right click on test note >> Add >> Thread (users) >> Thread Group.
  • 36. Adding Default HTTP Request Properties  This will let you define default http parameter for every request.  You can add default http request setting from ADD > Config Element > HTTP request default.
  • 37. Adding HTTP Requests  You can add it from ADD > Sampler > HTTP Request
  • 38. Adding Cookie Support  They are normally included to maintains a certain state for each user, e.g. cookies.  You can add it from ADD > Config Element > HTTP Cookie Manager.
  • 39. Adding a Listener toView/Store the Test Results  Listener responsible for storing all of the results of our HTTP request and presenting in Visualize mode.  You can add it from ADD > Listener > Summary Report.
  • 41. Preparing for Load Testing  Need to address a number of concerns with regards to the target server under test.  A load testing helps to benchmark performance behavior of a server, it is important to be able to identify the general expectations and other matters that would normally be taken into account in order to carry out a successful load testing.
  • 42. Need to Know  A suitable time to load-test the application, for instance when no development work is taking place on the server and/or no other users are accessing the server.  The performance metrics, accepted levels, or SLAs and goals.  Objectives of the test.  The Internet protocol(s) the application is(are) using (HTTPS, HTTP, FTP, etc.)  If your application has a state, the method used to manage it (URL rewriting, cookies, etc.)  The workload at normal time and at peak time.
  • 43. Some HelpfulTips to Get Better Results  Use meaningful test scenarios to construct 'real-life' test cases.  Run JMeter on a machine other than that running the application.  The machine running JMeter should have sufficient network bandwidth, memory, CPU to generate load.  Let JMeter Test Plan run for long time periods, hours or days, or for a large number of iterations.  Ensure that the application is stable and optimized for one user before testing it for concurrent users.  Incorporate 'thinking time' or delays using Timers in your JMeter Test Plan.  Keep a close watch on the four main things: processor, memory, disk, and network.
  • 44. Using Jmeter Components  We will test five key scenarios:-  Homepage  Keyword Search  Create Account  Select A Title  Add To Cart These scenarios will be included in a single JMeter Test Plan, for simplicity reasons.
  • 45. Recording HTTP Requests  JMeter Proxy can use to record all request send to server.  Create test plan with default http testing  Add HTTP Proxy Server in Workbench node.  Define port number of proxy server
  • 46. Creating the Test Plan  Right-click on the Test Plan element and select Add | Thread Group.  Configure the Number of Threads to 10, Ramp-Up Period to 1 second, and Loop Count to 50.  Add to the Test Plan Config Element | HTTP Request Defaults.  Add Pre-Processor | User Parameter Element or Config Element | CSV Data Set Config.
  • 47. Adding Listeners  Right click Thread Group node > Add > Listener.
  • 48. Running the Test Plan  When Jmeter script gets ready.  Click on “Start”.
  • 49. Interpreting the Results  Once the test is completed, we can now retrieve the results we have saved for each Controller.  With the exception of the Assertion Result Listener, the saved data can be viewed in numerous forms.
  • 50. Monitoring the Server's Performance  There is a special Listener that allows you to monitor the target server's performance as Samplers make requests.  This Monitor Result Listener is designed to work with Apache Tomcat version 5 and above.  Some server monitoring tools:  Perfmon  Blazemeter
  • 52. What is Correlation  A Correlation is a Connection or Association.  Capturing the dynamic data that is being generated by the server is called correlation.  Correlation will be done using the Regular Expression Extractor in Jmeter.
  • 53. Why Correlation  To overcome script fail we need a way which can capture these dynamically generated session values and pass it subsequently to any part of the script, wherever required. This method to identify and set the dynamic generated value is known as correlation. Sample of Regular Expression and Usage: Session ID = (.+?)  to correlate the url/dynamic id. EX: Session ID = jkjoujn434897h3jh35y9h&OrderID=ikikikke99874kmnjhh2
  • 54. Using Regular Expression Extractor in Jmeter Tests  Regular expressions are used to search and manipulate text, based on patterns.  This element will extract text from the current page using a Regular Expression to identify the text pattern that a desired element conforms with.  Right click the node > Add > Post Processor > Regular Expression Extractor
  • 56. What is Parameterization  It is the way of replacing a hard coded value in the script with a parameter which represents a list of values.  It is a script that contains the actual values used during recording and during script enhancement phase test engineer has to replace the recorded values with parameters is known as parameterizing the script.
  • 57. Why Parameterize  It allows you to test your script with different values.  Replace the constant values in Script with parameters.  simulate real user behavior while running the test
  • 58. Identifying the test data on AUT  While login “Username” & “Password” are parameter for which test data needed.  While registration “First Name”, “City” etc. is parameter for which test data needed.
  • 59. Using the CSV Data Config in Jmeter Tests  Create CSV file with list of username and password.  Store in same folder where your test stores.  Add CSV Data set into your test tree from config elements.  Add ${username},${password} in request sampler as parameter.
  • 60. Chapter 8 Adding Assertions to the test script
  • 61. What is Assertion  Assertions allow you to include some validation test on the response.  To ensure the responses you receive.
  • 62. Why Assertion  Assertions are used to perform additional checks on samplers.  They are processed after every sampler in the same scope.
  • 63. Types of Assertion in Jmeter  Response Assertion: Compared against various fields of response.  Duration Assertion: Tests each response was received within a given amount of time.  Size Assertion: Tests each response contains the right number of bytes in it.  XML Assertion: Tests response data consists of a formally correct XML document.  BeanShell Assertion: Checking using a BeanShell script.  MD5Hex Assertion: Check the MD5 hash of the response data.  HTML Assertion: Check the HTML syntax of the response.  XPath Assertion: Tests a document for well formedness.  XML Schema Assertion: The XML Schema Assertion allows the user to validate a response against an XML Schema.
  • 64. Running the tests and analyzing the Assertion results  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.
  • 66. Testing a Database Server  A few things you will need before proceeding to build a Database Test Plan are:  A working database driver, copy the .jar file contained in the database driver and pastes it in the lib folder of your JMeter.  A valid database-schema.  Valid non-empty database table(s).  A valid user-level access to the database.
  • 67. Testing an FTP Server  What you will need before proceeding to build a FTP Test Plan includes:  A running FTP server on the target machine.  A valid path to the shared files in your FTP server.  Valid non-empty files in the FTP installation path.  A valid user-level access to the files.
  • 69. Reducing resource requirements  Do not use GUI mode better use non-GUI mode.  Use Remote and Distributed testing for larger load testing.  Do not load more than 300 threads per Jmeter.  Use naming conventions for all the elements.  Use as few Listeners as possible.  Don't use "View Results Tree" or "View Results in Table" listeners during the load test; use them only during scripting phase to debug your scripts.  Rather than using lots of similar samplers, use the same sampler in a loop, and use variables (CSV Data Set) to vary the sample.  Use CSV output rather than XML.  Only save the data that you need.  Use as few Assertions as possible.
  • 70. Where to Put the Cookie Manager  The cookie manager stores and sends cookies just like a web browser.  Received Cookies can be stored as JMeter thread variables.  Manually add a cookie to the Cookie Manager.
  • 71. Where to Put the Authorization Manager  It’s specify one or more user logins for web pages that are restricted using server authentication.
  • 72. Bean Shell Server  The Bean Shell interpreter has a very useful feature it can act as a server, which is accessible by telnet or http.
  • 73. Distributed Testing  Master: The system running Jmeter GUI which control the test.  Slave: The System running Jmeter-server which takes commends from the GUI and send the requests to the target system.  Target: The Web Server planned for the load test.  JMeter client machine may not able to simulate enough users to stress server.  Control multiple machine to run JMeter without copying test samples to different machine.
  • 74. Sever Monitoring Tools (PerfMon)  During a load test, it is important to know the health of the servers loaded.  To address this, the plugin package now supports server monitoring!  Detail Link: https://code.google.com/p/jmeter-plugins/wiki/PerfMon
  • 75. Database Monitoring Tool (Jet Profiler)  Jet Profiler for MySQL is a query profiling tool for the MySQL database server.  Query, table and user performance  Graphical Visualization  Low overhead  User friendly  Detail Link: http://www.jetprofiler.com/
  • 76. Request Snipers Tools  It’s to monitors and analyzes all incoming and outgoing HTTP traffic between the browser and the web servers.  HttpFox  httpwatch  Gtmetrix  Yslow  Web Page Test  google speed test