Performance Testing
Performance Testing
Load testing simulates a real-world load on the system to see how it performs
under stress.
It helps identify bottlenecks and determine the maximum number of users or
transactions the system can handle.
It checks the product’s ability to perform under anticipated user loads.
The objective is to identify performance congestion before the software
product is launched in the market.
2. Stress testing
Stress testing is a type of load testing that tests the system’s ability to handle
a high load above normal usage levels.
It helps identify the breaking point of the system and any potential issues that
may occur under heavy load conditions.
It involves testing a product under extreme workloads to see whether it
handles high traffic or not.
The objective is to identify the breaking point of a software product.
3. Spike testing
Spike testing is a type of load testing that tests the system’s ability to handle
sudden spikes in traffic.
It helps identify any issues that may occur when the system is suddenly hit
with a high number of requests.
It tests the product’s reaction to sudden large spikes in the load generated by
users.
4. Soak testing
Soak testing is a type of load testing that tests the system’s ability to handle a
sustained load over a prolonged period.
It helps identify any issues that may occur after prolonged usage of the
system.
5. Endurance testing
6. Volume testing
7. Scalability testing
1. Response Time Metrics: It is the time taken for a system to respond
to a request. High response times can indicate performance
bottlenecks that affect user experience.
2. Throughput Metrics: The number of requests processed by the
system per unit of time, usually measured in requests per second
(RPS) or transactions per second (TPS). It helps in understanding
the system’s capacity and efficiency in handling concurrent
requests.
3. Resource Utilization Metrics: It measures the percentage of CPU
capacity used by the application. High resource utilization can
indicate inefficiencies and potential bottlenecks, guiding optimization
efforts.
4. Error Metrics: This metric is known as the percentage of requests
that result in errors, usually measured as a proportion of total
requests. A high error rate can indicate stability and reliability
issues, signaling potential problems in the application.
5. Scalability Metrics: Scalability metric is defined as the system’s
ability to handle increased load by adding resources. It ensures the
system can grow and maintain performance as demand increases
6. Endurance Testing Metrics: This metric is crucial to check the
application’s performance over an extended period, indicating
issues like memory leaks.
7. User Experience Metrics: It includes the time taken for the first byte
of data to be received by the client after a request is sent.
=========================================================
Apache JMeter™
The Apache JMeter™ application is open source software, a 100% pure Java
application designed to load test functional behavior and measure
performance. It was originally designed for testing Web Applications but has
since expanded to other test functions.
Apache JMeter may be used to test performance both on static and dynamic
resources, Web dynamic applications.
It can be used to simulate a heavy load on a server, group of servers, network
or object to test its strength or to analyze overall performance under different
load types.
Controls how many virtual users will access your website or app during the
test.
When using the scheduler, JMeter runs the thread group until either the
number of loops is reached or the duration/end-time is reached - whichever
occurs first.
Note that the condition is only checked between samples; when the end
condition is reached, that thread will stop.
JMeter does not interrupt samplers which are waiting for a response, so the
end time may be delayed arbitrarily.
Samplers
Samplers perform the actual work of JMeter.
Each sampler (except Flow Control Action) generates one or more sample
results.
The sample results have various attributes (success/fail, elapsed time, data
size etc.) and can be viewed in the various listeners.
FTP Request
This controller lets you send an FTP "retrieve file" or "upload file" request to
an FTP server.
If you are going to send multiple requests to the same FTP server, consider
using a FTP Request Defaults Configuration Element so you do not have to
enter the same information for each FTP Request Generative Controller.
When downloading a file, it can be stored on disk (Local File) or in the
Response Data, or both.
HTTP Request
It also lets you control whether or not JMeter parses HTML files for images
and other embedded resources and sends HTTP requests to retrieve them.
The following types of embedded resource are retrieved:
● images
● applets
● stylesheets (CSS) and resources referenced from those files
● external scripts
● frames, iframes
● background images (body, table, TD, TR)
● background sound
Listener
Listeners in JMeter are reporting components that will show us the results and
the reports.
Most of the listeners perform several roles in addition to "listening" to the test
results.
They also provide means to view, save, and read saved test results.
Note that Listeners are processed at the end of the scope in which they are
found.
The various listeners have a panel whereby one can specify the file to which
the results will be written (or read from).
By default, the results are stored as XML files, typically with a ".jtl"
extension.
Storing as CSV is the most efficient option, but is less detailed than XML (the
other available option).
Listeners do not process sample data in CLI mode, but the raw data will be
saved if an output file has been configured.
In order to analyse the data generated by a CLI run, you need to load the file
into the appropriate Listener.
=========================================================
Download JMeter
File> New
OR
Create Thread groups (Users)
Right click on Test Plan
Add > Thread(User) > Thread Group
Thread group is created
Add Name , Comment (optional) Number of Thread, Ramp_up period
And Lop count
Create sampler
Right click on Thread Group
Add > Sampler > HTTP Request
https://www.qatouch.com/blog/performance-testing/#:~:text=Why%20is%20pe
rformance%20testing%20crucial?%20Performance%20testing,is%20vital%20f
or%20customer%20retention%20and%20satisfaction.