Performance Testing Tutorial For Beginners | Performance Testing Using Jmeter | Simplilearn
Summary
TLDRThis video script from Simply Learn's YouTube channel offers an in-depth exploration of performance testing, covering its fundamentals, types, process, and metrics. It emphasizes the importance of performance testing in ensuring a software application meets speed, scalability, and stability requirements before launch. The script also introduces various performance testing tools, with a focus on Apache JMeter, highlighting its benefits such as cost-free usage, platform independence, and strong community support. A practical demonstration of JMeter's functionality is provided, illustrating how it simulates user behavior to test web server performance.
Takeaways
- 📚 Performance testing is a critical phase in product launches to ensure the product meets performance expectations before market release.
- 🔍 The main goal of performance testing is to identify and eliminate performance bottlenecks, focusing on speed, scalability, and stability under specific workloads.
- 🤖 Performance testing is not about finding bugs but rather about addressing performance glitches to provide stakeholders with information on application performance.
- 📈 There are six types of performance testing: load testing, stress testing, volume testing, capacity testing, reliability testing, and scalability testing.
- 🛠️ The performance testing process consists of eight parts: requirement gathering, tool selection, performance test planning, test development, test modeling, test execution, result analysis, and reporting.
- 🌟 Performance testing metrics include processor usage, memory usage, response time, throughput, and hit ratios, among others.
- 🔧 Top performance testing tools include Load Runner, Web Load, Load UI, NeoLoad, and Apache JMeter, with JMeter being a popular open-source tool.
- 🎯 JMeter's advantages include being free of cost, platform-independent, customizable, offering recording and playback features, and having strong community support.
- 📊 JMeter simulates user behavior for load testing, providing a way to conduct performance tests without the need for actual users, and generates results in various formats for analysis.
- 🚀 The importance of performance testing lies in preventing issues like slow performance, inconsistent operation across systems, and poor usability, which can lead to a product's failure in the market.
Q & A
What is the primary purpose of performance testing?
-The primary purpose of performance testing is to verify and validate the overall performance of a product, ensuring that it meets the expected performance criteria such as speed, scalability, and stability before it is launched into the market.
What are the three main factors performance testing focuses on?
-Performance testing mainly focuses on three factors of a software program: speed (response time), scalability (determining the maximum user load), and stability (checking the application's stability under various workloads).
Why is performance testing important for a software system?
-Performance testing is important because it goes beyond features and functionality to address response time, reliability, resource usage, and scalability. It helps identify and eliminate performance bottlenecks, ensures the application meets performance requirements, and prevents potential issues like slow running, inconsistencies across different operating systems, and poor usability.
What are the six types of performance testing mentioned in the script?
-The six types of performance testing are load testing, stress testing, volume testing, capacity testing, reliability testing, and scalability testing.
How does stress testing differ from load testing?
-Load testing focuses on the application's performance under normal and peak usage, whereas stress testing aims to find different ways to break the system by determining how much load a system can sustain before it breaks down and how it recovers once it has crashed.
What is the significance of capacity testing?
-Capacity testing is significant as it checks the application's capability to meet future business volumes. It helps in determining the application's ability to support future load and the additional resources required to make the environment capable of handling the increased load.
What are the eight parts of the performance testing process?
-The eight parts of the performance testing process are requirement gathering, selection of tools, performance test plan, performance test development, performance test modeling, execution of test, test result analysis, and report.
What are some key performance testing metrics?
-Key performance testing metrics include processor usage, memory usage, throughput, response time, hit ratios, and top waits.
Why is Apache JMeter a preferred tool for performance testing?
-Apache JMeter is preferred due to its open-source nature, no cost, platform independence, high customization capability, ease of recording and playback, and strong community support.
How does JMeter simulate user behavior for load testing?
-JMeter simulates user behavior by creating virtual users that perform actions on a web server or other objects, similar to how real users would interact with an application. It generates requests and measures the server's response to these requests, providing insights into the application's performance under load.
What are the steps to set up a performance test using JMeter?
-To set up a performance test with JMeter, you start by opening the JMeter application, adding a test plan and thread group to define the virtual users and test scenarios, adding an HTTP request to specify the server and path, and then adding listeners for result analysis. After configuring these elements, the test can be executed and the results analyzed.
Outlines
🚀 Introduction to Performance Testing
This paragraph introduces the concept of performance testing, emphasizing its importance in the product launch process. It outlines the basics of performance testing, explaining that it verifies and validates the overall performance of a product. The main goal is to ensure the product meets expected performance standards before market launch. The paragraph also discusses the relevance of performance testing, highlighting that it goes beyond features and functionality to focus on response time, reliability, resource usage, and scalability. It mentions that performance testing helps identify and eliminate performance bottlenecks, and that without it, software may suffer from issues like slow performance, inconsistencies, and poor usability. The introduction ends with a call to action to subscribe to the YouTube channel for updates.
📊 Types of Performance Testing
This section delves into the different types of performance testing, which include load testing, stress testing, volume testing, capacity testing, reliability testing, and scalability testing. Load testing assesses application performance under normal and peak usage, focusing on response to user requests and system endurance. Stress testing aims to identify the breaking point of a system by gradually increasing load. Volume testing evaluates system performance with respect to data volume, ensuring the application can handle a growing database size. Capacity testing checks if an application can meet future business volumes, predicting the application's capability to support increased load. Reliability testing measures the system's ability to return to normal operation after an abnormal state. Lastly, scalability testing determines if the application can scale up to meet increased user load demands. Each type is crucial for ensuring a robust and efficient software application.
🔧 Performance Testing Process
The paragraph outlines the eight-step process of performance testing, starting with requirement gathering where the performance team collects information on the application's architecture, technologies, intended users, and other requirements. The second step involves selecting appropriate performance testing tools based on a proof of concept. The third step is the performance test plan, which includes test planning and design. The fourth step is performance test development, where use cases are created and scripts are developed for the test environment. The fifth step is performance test modeling, which involves creating a performance load model for test execution. Execution of tests is the sixth step, where tests are run incrementally to identify performance metrics. The seventh step is test result analysis, where the performance tester evaluates the effectiveness of the testing effort. The final step is the report, where the test results are simplified for clarity and to provide actionable insights for the development team.
🛠️ Performance Testing Tools and Metrics
This part of the script discusses the top 5 performance testing tools available in the market: Load Runner, Web Load, Load UI, NeoLoad, and Apache JMeter. It highlights the importance of these tools in facilitating performance testing. The script then focuses on Apache JMeter, explaining why it is a preferred tool. JMeter is an open-source, pure Java application designed for load testing web applications and other server types. It is appreciated for its free cost, platform independence, customization options, recording and playback features, and strong community support. The reasons for using JMeter include its ability to handle different types of applications and servers, its user-friendly interface, and the possibility for developers to customize it as needed.
🎥 Hands-on Demo with JMeter
The final paragraph provides a practical demonstration of how to use JMeter for performance testing. It guides the user through setting up a test plan, adding a thread group to simulate users, configuring the test with options like the number of threads (users), ramp-up period, and loop count. The demonstration includes adding an HTTP request to the test, which involves specifying the server name or IP and the path. The paragraph also explains how to add listeners to the test for output visualization, such as View Results, Graph Results, and View Results in Table. The script concludes with running the test and briefly describes how JMeter processes the test results, providing a comprehensive overview of the performance testing process using JMeter.
Mindmap
Keywords
💡Performance Testing
💡Load Testing
💡Stress Testing
💡Volume Testing
💡Capacity Testing
💡Reliability Testing
💡Scalability Testing
💡Performance Metrics
💡Apache JMeter
💡Test Plan
Highlights
Performance testing is a crucial phase in any product launch, ensuring the product meets expected performance standards before market release.
Performance testing is conducted under specific workloads to identify and eliminate performance bottlenecks in software applications.
The main goal of performance testing is to evaluate the speed, response time, stability, reliability, scalability, and resource usage of a software application.
Performance testing focuses on three key factors: speed, scalability, and stability of a software program under various workloads.
The purpose of performance testing is to provide stakeholders with information about the application's performance, revealing areas for improvement before the product launch.
Without performance testing, software may suffer from issues like slow performance under concurrent usage, inconsistencies across different operating systems, and poor usability.
There are six types of performance testing: load testing, stress testing, volume testing, capacity testing, reliability testing, and scalability testing.
Load testing evaluates an application's performance under normal and peak usage, focusing on the maximum load the application can handle and database capacity.
Stress testing aims to find ways to break the system by gradually increasing the load until the breaking point, assessing the system's recovery after a crash.
Volume testing checks the system's performance with respect to the volume of data, ensuring the application can handle a growing database size over time.
Capacity testing determines if an application can support future load and resource requirements, helping to identify additional resources needed for scalability.
Reliability testing verifies if an application can return to normal operation after an abnormal state, estimating the time taken for recovery.
Scalability testing assesses whether the application can scale up to handle increased user load when needed.
The performance testing process consists of eight parts: requirement gathering, tool selection, performance test planning, test development, test modeling, execution of tests, result analysis, and reporting.
Apache JMeter is a preferred performance testing tool due to its open-source nature, platform independence, customizability, recording and playback features, and strong community support.
JMeter simulates real user behavior for load testing, allowing for the assessment of web applications, web services, LDAP databases, and shell scripts.
Transcripts
hey everyone welcome to simply learn's
youtube channel in this session we will
learn everything about performance
testing we shall begin with learning the
basics of performance testing and what
is its relevance after that we shall see
the types of performance testing then we
shall see the performance testing
process and performance testing metrics
post that we will learn some performance
testing tools and after we know all
about performance testing we shall see
the basics of geometer and why is it
more sought after tool for performance
testing finally we will have a look on
hands-on demo to understand the working
of meter and performance testing is
performed using it
but before we begin make sure that you
have subscribed to our youtube channel
and click on the bell icon so that you
can never miss an update from simply
learn so without further ado let's get
started with the first topic that is
what is performance testing
so performance testing is one of the
most important phases of any product
launch as it verifies and validates the
overall product performance this testing
can be done in different forms depending
upon the resource availability and the
type and volume of the user base
the main agenda behind conducting
performance testing on any product is to
make sure that the product's performance
is as expected before it gets launched
into the market so performance testing
is the process of testing a software
application under a specific workload
performance testing is a software
testing process used to test the speed
response time stability reliability
scalability and resource usage of a
software application under a particular
workload
the main purpose of performance testing
is to identify and eliminate performance
bottlenecks in the software application
performance testing mainly focuses on
three factors of a software program
first one is the speed
here it identifies whether the response
of the application is fast or not then
comes scalability where the maximum user
load is determined and the third one is
stability where the stability of the
application is checked under various
workloads
now we know what is performance testing
let us understand why if we need
performance testing
the only concern of a software system is
not features and functionality the
response time reliability resource and
scalability are also important factors
so the goal of performance testing is
not to find bugs but to eliminate
performance glitches
performance testing is performed to help
the stakeholders with information about
the application concerning the
application speed stability and
scalability furthermore performance
testing reveals what needs to be
improved before the product goes into
the market if there is no performance
testing the software might suffer from
issues such as running slow while
several users use it simultaneously
inconsistencies across different
operating systems and poor usability
performance testing determines if the
software or application meets speed
scalability and stability requirements
under expected workloads applications
sent to market with poor performance
metrics due to non-consistent or poor
performance testing are likely to bring
a bad reputation and fail to meet the
expected sales goals
now we know the relevance and need for
performance testing let's look at the
types of performance testing
so there are six types of performance
testing namely load testing stress
testing volume testing capacity testing
reliability testing and scalability
testing let's have a look at all the six
types of testing one after the other
so the first type is load testing load
testing is a type of performance testing
where the application is tested for its
performance on normal and peak usage
an application's performance is checked
concerning its response to the user
request and its availability to respond
consistently with an accepted endurance
on different user loads here the main
consideration is the maximum load the
application can hold before the
application starts behaving abruptly
then another consideration is regarding
how much data the database can handle
before the system crashes the second
type of performance testing is stress
testing
stress testing is a type in which
different ways to break the system are
found that is how much load a system can
sustain
stress testing has an incremental
approach where the load is increased
gradually the test started with the load
for which the application has already
been tested then more load is added
slowly to stress the system
the point at which we start seeing
servers not responding to the request is
considered the breaking point
here the major considerations are the
maximum load to a system can sustain
before it breaks down then how is the
system broken down and how will the
system be able to recover once it has
crashed
we also see in how many ways a system
can break and which are the weak nodes
that are to be kept in mind while
handling the unexpected load moving
forward the next type is volume
testing volume testing is the type where
the performance of the system is checked
with respect to the volume of the data
to execute a volume test a huge volume
of data is entered into the database
this test can be incremental or steady
test in the incremental test the volume
of the data is increased gradually
generally with the application usage the
database size grows and it is necessary
to test the application against a heavy
database if we consider an example let's
say there is a website of college having
small amounts of data to store initially
but after 5-10 years the data stored in
the database of the website is much more
and has become huge
now comes the fourth type of performance
testing the capacity testing
so capacity testing is a type of testing
where the application is checked for its
capability to meet the business volumes
capacity testing is generally done for
future prospects
here the main concerns are if the
application would be able to support the
future load
if the environment is capable of
standing the upcoming increased loan and
what are the additional resources
required to make the environment capable
enough
capacity testing helps in determining
how many uses or transactions of a given
web application is capable of supporting
and will perform well during this
testing resources such as processor
capacity
network bandwidth memory usage disk
capacity etc are considered and altered
to meet the goal
to consider an excellent example of
capacity testing we can see the case of
online banking moving forward the next
type of testing is the reliability
testing
reliability testing is a type in which
the application is verified if the
application would be normal again after
an abnormal state
it estimates the time that the system
would take to return to its normal state
to understand the concept let's say
there is an online trading site that
experiences some failure and because of
which the users are not able to buy or
sell shares at a certain point of the
day but after a couple of hours they
were able to operate their shares and
the application became normal this is
when it can be said that the application
is reliable and can recover from its
abnormal state the last type of testing
is scalability testing
scalability testing is a type where the
application is determined if it would be
able to scale up whenever needed
the need for scaling up comes when there
is an increase in user load
now when we have learned the types of
performance testing we must learn the
process of performance testing
so the process of performance testing is
divided into eight parts that is
requirement gathering selection of tools
performance test plan performance test
development performance test modeling
execution of test test result analysis
report now let's have a look at all of
these processes one after the other the
first step in the process is requirement
gathering the requirements are
identified and gathered from the clients
by the performance team this includes
getting information on the application's
architecture technologies database used
intended users functionality application
usage test requirement hardware and
software requirements etc
the second step in the process is
selection of tools
after the previous step poc or proof of
concept is done with the available tools
the proof of concept is a sort of
demonstration of real-time activity but
in a limited sense
the list of available tools depends on
the tool's course the protocol that the
application is using the technologies
used to build the application the number
of users we were simulating for the test
etc now the third step
the third step is the performance test
plan in reference to the above two steps
test planning and designing are
conducted the process of test planning
involves information on how the
performance test is going to take place
like the test environment workload
hardware etc moving forward the fourth
step is performance test development in
this step the use cases for the
identified functionalities are created
these use cases are shared with the
client for their approval
once the clients approve the use case
the script development begins these
scripts are validated against several
different users and parallel to script
creation the performance team sets up
the test environment the performance
team also takes care of metadata through
scripts if the client does not take up
that activity so the next step is
performance test modeling
performance load model is created for
the test execution
this step aims to validate whether the
given performance metrics are achieved
during the test or not then the sixth
step is execution of tests the scenario
is designed according to the load model
in controller or performance center
initially the tests are not executed
with maximum users that are in the load
model the test execution is done in
incremental order let's say there are
thousand users then the scenario will
begin testing from 100 then go to 250
then 350 and so on it will gradually
increase and go up to 1000 users
the next step is the seventh step in our
process
that is the test result analysis
the test results are the most important
deliverable for the performance tester
this is where we can prove the return on
investment and productivity that a
performance testing effort can provide
what makes the result analysis process
more effective is that we must have a
unique and meaningful name for every
test result which will help us
understand the test purpose in the test
summary certain things must be included
like the reason for failure how the
performance of the application changes
regarding the previous runs it is also a
good practice to make a result summary
after each test run so that the analysis
results are not compiled every single
time the results are referred
then the final and the last step in
performance testing process is the
report the test results should be
simplified so that conclusion is clearer
and should not create any derivation
the development team needs more
information on analysis comparison of
results and details of how the results
were obtained the test report is
considered to be good if it's brief
descriptive and to the point
now that we know the performance testing
the next important topic to discuss is
the understanding of performance testing
metrics
the first is processor usage which
refers to the amount of time the
processor spends executing the non-idle
threads second metric is memory usage
memory use is the amount of physical
memory available to the processor on a
computer system the third metric is this
time which is the amount of time the
disk is busy in executing read or write
request the fourth metric is the
bandwidth that shows the bits per second
used by a network interface moving
forward the next metric is the private
bytes it is the number of bytes a
process has allocated that can be shared
amongst the other processes these are
used to measure memory leaks and usage
then comes the committed memory this is
the amount of virtual memory used
then the next metric we have is the
response time it is the time between
when the user enters a request to time
to the first character of the response
is received
next metric is the throughput it is the
rate at which a computer or a network
receives requests per second moving
forward the next metric is the hit
ratios the hit ratios are concerned with
the number of sql statements that are
handled by caged data instead of
expensive input output operations
and the last metric in our list is the
top weights these are monitored to
determine what wait times can be cut
down to make the data retrieval faster
from memory apart from this some metrics
like the rollback segment garbage
collection
thread counts heads per second cpu
interruption per second disk you length
etc now when we know almost everything
that is needed regarding performance
testing it is very important to know the
tools that make performance testing
possible here are the top 5 performance
testing tools in the market today the
first tool we have is the load runner or
hp load runner as the name suggests the
loadrunner is great when it comes to
handling a large amount of users for
testing
the second tool in our list is web load
web load is one of the best testing
tools for stress and load testing the
next tool in our list is load ui load ui
is a great testing tool to map the
scalability and speed of the target
product the fourth tool in our list is
new load it is one of the fastest
testing tools with a speed of around 10
times the traditional testing tools that
are integrated seamlessly into our
existing software with a wide array of
tests the last tool in our list is the
apache j meter apache j meter is one of
the best and most used testing tools in
the market right now it is highly
capable of creating a large number of
virtual users working on web server
moving forward we shall talk about
jmeter and understand why jmeter is
preferred over all the other performance
testing tools in the market
so moving forward let's see what jmeter
is
j meter or apache j meter is an open
source software that is 100 pure java
application
the application is designed to load or
test functional behavior and measure
performance
j meter is originally designed for
testing web applications but has since
expanded to other test functions to
understand the concept of j meter let us
assume that someday your team leads tell
you to perform performance testing on
some website like facebook or google.com
for 100 users
what would be the first thing comes to
your mind do you think it's practically
possible to arrange 100 people with
computers and access to internet and
accessing the same website
now just imagine the infrastructure
requirement when this testing has to be
done for 10 000 users this is when a
need for software like jmeter arises so
what jmeter does is it actually
simulates
it will simulate the real user's
behavior and perform load tests on
server group of servers network or
object now let's have a look at some
reasons why gmeter is used for load
testing we have divided these reasons
into six parts
the first one is it's free of cost
second one is performance testing of
applications next one platform
independent the fourth one is
customizable fifth is recording and
playback and finally sixth is the
community support let's see all of these
one after the other the first reason we
have as free of cost one of the main
deciding factors in any software is its
cost normally a software can range from
high as six to seven figures per license
here jmeter is free of cost very
intuitive and has all the possibilities
you need to automate your work then the
second reason is performance testing of
applications the application is used to
perform performance testing on different
types of applications like web
applications web services ldap database
and shell scripts jmeter can conduct
load and performance tests for many
different servers and server types web
http and https database via jdbc ldap
and jms the third reason is
platform independence
jmeter is written and developed using
java to run on any environment or
workstation that accepts java virtual
machine for example windows linux mac
etc the next reason we have is that the
jmeter is customizable since jmeter is
an open source application it enables
developers to customize
whenever needed jmeter has a
comprehensive and user friendly
graphical user interface
parameters are easy to define and
understand scripting is simpler and
clearer and adding and defining elements
is more intuitive also one screen shows
everything you need the script the
scenario and the analysis
the samplers are highly customizable
when determining which request to be
sent to the host however samplers don't
enable full control of test actions
moving forward the following reason is
recording and playback
the application provides record and
playback options enabled with the drag
and drop feature making the application
faster and easier the next and the last
reason on our list is incredible
community support jmeter is an open
source tool with a brilliant community
that keeps adding features and supports
users who run into issues and problems
this ensures new users always have
someone to answer their questions and
longtime users can improve their
abilities on gmeter also having an open
source tool ensures that it keeps
getting better and is always in line
with users needs and requirements
finally let's have a look into the demo
that shows the working of j meter
so the first step is we shall go to the
apache j meter folder
in that folder go inside the bin folder
and select the j meter jmeter.pat file
double click on this file
this might take a while
and then the jmeter window will open on
the screen
the home window is divided into two
sections on the left side all the test
plan elements are added and on the right
side all the configurations of that
element are
added as we are on the test plan element
we can see the configurations of the
same
here the test plan is like a place or a
container where all the elements we will
be using to perform this test will be
stored all the requests listeners and
everything will be stored here
i have renamed this test plan as
performance testing
now the first step is to add thread
group
right click on the performance testing
go to add
then go to thread or users and select
thread group
let's name this as perform
here the thread group refers to the used
or created users or needed to run this
test
it has several different options like
the action to be taken after there is an
error you can choose it the way you want
then there is this number of threads
where you can choose the number of users
you want then there is a ramp up period
in seconds option that states the time
gap between the user's hits third there
is a loop count where you can choose how
many times the test will run for the
number of users you can also choose the
test to run in finite times there is
also a scheduler here to help you
schedule the start time and the test end
time let's make the number of threads to
b2 and let's make the loop count to be
100
the next step is to add an http request
for that right click on the thread group
go to add option and go to the sampler
option in the menu that appears select
the http request option here on the
screen there is a server name or ipbox
we have to give the server name or the
ip in that let's pick up a website and
place the link in the box we shall use
the simply learns website here go to
simply learn's website and copy the url
from here then come back to the jmeter
window and paste it onto the server name
box keep in mind we don't need to give
the http or https since these are
protocols which will come in the other
box and
they will be automatically taken in the
http request case
then in the path dialog box we will
leave the forward slash there since we
have to access the root page
and let's rename this http request as
simple now
to get results we shall add listeners
listeners are something that are used to
provide the outputs of a load test there
are different types of listeners present
in jmeter and many may be added using
plugins we will use three different
listeners here to have an idea about the
representation that the jmeter provides
for that right click on the thread group
then go to the add select listener
option and go to the view results entry
option then again right click on the
listener option and choose graph results
and for the third listener again right
click and select the view results in the
table option
now it's time to run the test
for running the test there are three
simple ways first you can simply click
on the green button here to run second
is you can go to the run option and
choose the run the test and the third
way you can right click on the first
jmeter and choose to run
let's simply choose the green button and
run the test
first we will have to save this jmeter
test and then we shall go on to check
the results of the test
here in the view results tree we can see
the test being run
the same in the case of graph results we
can see the throughput option then we
can also see the time the test has been
executing since we had put the threads
to 2 and the loop count to 100 so the
test will run for a while
we can check the view results in the
table we can see different performance
testing metrics on the screen you can
see the thread name label sample time
per second bytes sort bytes and the
latency
and in the tree option when we click on
the test we can see a lot of information
appearing on the screen these are again
several performance testing metrics and
in the graph results we can see the
graph coming up on the screen now which
represents the test taking place with
respect to the ip address thread and
loop counts so what jmeter exactly does
is creates a request and sends it to the
server once it receives the service
response it collects them and visualizes
those details in a chart or graph after
that it processes the service response
and finally it generates the test
results in several formats such as text
xml json so that the tester can analyze
the data
and this was all for today's session
hope you guys found it informative and
helpful thanks for watching and stay
tuned for more from simply learn
hi there if you like this video
subscribe to the simply learn youtube
channel and click here to watch similar
videos to nerd up and get certified
click here
Weitere ähnliche Videos ansehen
Software Testing Tutorial #17 - What is Functional Testing
Why should I monitor Kubernetes during Performance testing #kubernetes #performanceengineering
Mengetahui Pengujian Perangkat Lunak || Materi Informatika Kelas 12
Appium Tutorial 01 :Introduction To Mobile App Testing | Appium
API testing interview questions and answers for QA Engineers
JMeter Performance Testing Tutorial 1 - What is JMeter and how to install JMeter on Windows 10
5.0 / 5 (0 votes)