0% found this document useful (0 votes)
16 views

unit 4 stqa

Uploaded by

Anisha Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

unit 4 stqa

Uploaded by

Anisha Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Unit 4

Performance Testing and


Regression Testing

Prepared By:
Mr.C.B.Pednekar
Performance Testing concepts
 Performance testing is a type of software testing that focuses
on evaluating the performance and scalability of a system
or application.
 Performance testing aims to identify bottlenecks, measure
system performance under various loads and conditions,
and ensure that the system can handle the expected number
of users or transactions.
 While doing performance testing on the application, we will
concentrate on the various factors like Response time, Load
and Stability of the application.
 Response time: Response time is the time taken by the

server to respond to the client's request.

 Load: Here, Load means that when N-number of users using

the application simultaneously or sending the request to the


server at a time.

 Stability: For the stability factor, we can say that, when N-

number of users using the application simultaneously for a


particular time.
Types of Performance Testing
 Following are the types of performance testing:
 Load testing
 Stress testing
 Scalability testing
 Stability testing
Load Testing
 Load testing determines the behavior of the application when multiple

users use it at the same time. It is the response of the system measured
under varying load conditions.

 The load testing is carried out for normal and extreme load conditions.

 Load testing is a type of performance testing that simulates a real-world

load on a system or application to see how it performs under stress.

 The goal of load testing is to identify bottlenecks and determine the

maximum number of users or transactions the system can handle.

 It is an important aspect of software testing as it helps ensure that the

system can handle the expected usage levels and identify any potential
issues before the system is deployed to production.
Load Testing Techniques
 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.
 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.

 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.
Objectives of Load Testing
 Evaluation of Scalability: Assess the system’s ability to handle

growing user and transaction demands. Find the point at which


the system begins to function badly.

 Planning for Capacity: Describe the system’s ability to


accommodate anticipated future increases in the number of users,
transactions and volume of data. Making well-informed decisions
regarding infrastructure upgrades is made easier by this.

 Determine bottlenecks: Identify and localize bottlenecks in the

application or infrastructure’s performance. Finding the places


where the system’s performance can suffer under load is part of this.
 Analysis of Response Time: For crucial transactions and user

interactions, track and evaluate response times. Make sure that


the system responds to changes in load with reasonable response
times.

 Finding Memory Leaks: Find and fix memory leaks that may

eventually cause a decline in performance. Make sure the


programme doesn’t use up too many resources when it’s running.
Load Testing Process
 Test Environment Setup: Firstly create a dedicated test environment setup
for performing the load testing. It ensures that testing would be done in a
proper way.
 Load Test Scenario: In second step load test scenarios are created. Then
load testing transactions are determined for an application and data is
prepared for each transaction.
 Test Scenario Execution: Load test scenarios that were created in previous
step are now executed. Different measurements and metrices are gathered
to collect the information.
 Test Result Analysis: Results of the testing performed is analyzed and
various recommendations are made.
 Re-test: If the test is failed then the test is performed again in order to get
the result in correct way.
Metrics of Load Testing
 1. Average Response Time
 It tells the average time taken to respond to the request generated by the clients
or customers or users.
 It also shows the speed of the application depending upon the time taken to
respond to the all requests generated.
 2. Error Rate
 The Error Rate is mentioned in terms of percentage denotes the number of
errors occurred during the requests to the total number of requests.
 These errors are usually raised when the application is no longer handling the
request at the given time or for some other technical problems.
 It makes the application less efficient when the error rate keeps on increasing.
 3. Throughput
 This metric is used in knowing the range of bandwidth consumed during the
load scripts or tests and it is also used in knowing the amount of data which is
being used for checking the request that flows between the user server and
application main server.
 It is measured in kilobytes per second.
 4. Requests Per Second
 It tells that how many requests are being generated to the application
server per second.
 The requests could be anything like requesting of images, documents, web
pages, articles or any other resources.
 5. Concurrent Users
 This metric is used to take the count of the users who are actively present
at the particular time or at any time.
 It just keeps track of count those who are visiting the application at any
time without raising any request in the application.
 From this, we can easily know that at which time the high number of users
are visiting the application or website.
 6. Peak Response Time
 Peak Response Time measures the time taken to handle the request.
 It also helps in finding the duration of the peak time(longest time) at which
the request and response cycle is handled and finding that which resource
is taking longer time to respond the request.
Performance Testing Tools
 Apache JMeter: It is an open-source tool used for performance

testing and load testing of applications. It simulates multiple users


sending requests to a server, collecting performance metrics to
analyze the application’s behavior under different load conditions.

 Load Runner: LoadRunner is a performance testing tool used to

simulate virtual users and analyze the behavior of applications


under load.

 Web Load: Web Load is a performance testing tool designed to test

the scalability and reliability of web applications under various


load conditions.
Apache JMeter
 Apache JMeter is a pure Java-based open-source software application used

for load testing, functional behavior and measuring performance.

 It is used for testing a variety of services, i.e. web applications, databases,

etc.

 JMeter was initially developed to test applications, but it has expanded to

several other test functions with several advancements.

 It is used to execute performance testing, functional testing, and load

testing.

 The software is used to simulate a significant amount of load on a server

or a group of servers to test the strength and analyze the strength under
different load types.
Apache JMeter Features
 Performance Testing:
Performance is one of the most important features of any
application, so performance testing plays a vital role in testing any
application. JMeter tool has this feature of Performance Testing.
 Load Testing:
Load Testing is where we assess how the application will perform
when it faces a load of users and activity, and JMeter is good with
this type of testing both with web applications and databases.
 Functional Testing:
Functional Testing checks if the functionality of the application is
up to the mark. It ensures that the application behaves as expected
and delivers the desired features and functionalities to the user.
 Scripting:
Scripting allows us to create custom test scenarios which can’t be
created by pre-built components, because of this feature JMeter is
able to test wide range scenarios and corner cases.
 Protocol Support:
Protocol Support is the ability of an application to exchange data
with other systems using specific communication protocols.
Like protocols supported by JMeter are mentioned below:
– Web: HTTP, HTTP, FTP
– Web Services: SOAP/XML-RPC
– Network Devices: TCP/IP, Ethernet
– API: REST, GraphQL
 Distributed Testing:
Distributed Testing is technique which allows to distribute the load
for testing into multiple machines rather than a single machine.
These multiple machines are controlled by a single parent machine.
It is poweful technique used JMeter check the real time
consequences of load.
 Graphical Reporting:
Graphical Reporting is where we use Interactive visual to represent
the report to understand performance trends, identify bottlenecks,
and optimize your application’s performance.
Applications of Apache JMeter
 Web Application Testing:

Web Application covers many frameworks web testing can be


divided into Load Testing, Stress Testing, Functional Testing, API
Testing, etc.

 Mobile Application Testing:

Wide range features of JMeter supports various protocols, scripting


which effectively helps in Mobile Testing.

Some uses of JMeter testing in Mobile Application are Performance


Testing, Battery Consumption Testing, etc.
 Database Testing:

 It is the process in we evaluate how a database responds under

different workloads and conditions. It is very beneficial for


improving performance and for enhancing the user experience. And,
JMeter is one of the tool used for doing so, as it offers various
plugins and customization operation to improve the database
testing.
 Other Application:
 Apart from Web , Mobile and Database JMeter can be used for other
applications like Desktop Applications , Testing Network Protocols,
etc.
Apache JMeter Working
 JMeter is a Java based application or tool that
simulates a group of users and sends request to a
target server.
 Hence, returns statistics which shows the
functionality and performance of the server.
Regression Testing
 Regression testing is a black box testing techniques.

 It is used to authenticate a code change in the software does not


impact the existing functionality of the product.
 Regression testing is making sure that the product works fine with
new functionality, bug fixes, or any change in the existing feature.
 Regression testing can be performed on a new build when there is a
significant change in the original functionality.
 It ensures that the code still works even when the changes are
occurring.
 Regression means Re-test those parts of the application, which are
unchanged.
When to do regression testing?

 When new functionality is added to the system and the code

has been modified to absorb and integrate that functionality


with the existing code.

 When some defect has been identified in the software and

the code is debugged to fix it.

 When the code is modified to optimize its working.


Regression Testing Process
Why automate Regression Testing?
 Repeatability:
 In a strict agile project, regression tests need to be conducted in a highly
repeated manner. If it’s done manually, the testing process takes a lot of
time as the number of test cases grows.
 Automated tests, however, can help get them covered even if they need to
be triggered daily and would be much more efficient.
 No Human Intervention:
 Once the test cases are automated, there is no human intervention
required while running.
 One can schedule them or trigger them whenever needed and return to
the results once they are completed. Also, this way, testing is going on
24*7 without human support.
 Lesser turnaround time:
 Manual testing can never match the pace of automated tests as and when
the number of test cases grows.
 Automated Regression tests can be much faster and would be able to
certify a new build in some hours when manual testing would take days
to cover.
 Increased Coverage:

 With automated tests, you can cover the same test cases in less time
over different combinations of browsers and OS.
 With automation tools like BrowserStack, you can cover regression test
suite simultaneously over multiple combinations of devices, OS, and
browsers in no time.
 You can get detailed analysis reports once the tests are completed, and
they are thorough enough to discover any underlying issues.

 Efficient:

 Humans can be very error-prone when it comes to repeating the same


task over and over again.
 However, there is no chance of errors in Automated Regression tests;
hence, you would see much better results.
Which tools can be used for Automating
Regression Tests?
 Selenium is an open-source project that provides various tools and
libraries to support browser automation. It supports many
scripting languages like PHP, Java, Ruby, C++, JS, etc. It can easily be
integrated with popular frameworks like Maven, Ant, etc.
 Appium is another open-source tool for running automation
scripts and testing native, mobile-web, and hybrid applications
on Android or iOS using a web driver. There are two versions
available for Appium. One is a Node.js-based tool and a second is a
desktop tool. However, both are used for mobile regression test
automation.
 TestNG: TestNG is inspired by JUnit and NUnit. TestNG has been

designed in such a way that it covers a wider range of test


categories: unit, functional, integration, as well as end-to-end, with
easy-to-use functionalities.

 Maven is an automation tool used primarily for Java projects. It can

also manage scripts written in C#, Ruby, Scala, and other languages.

 Jenkins is an open-source automation server. It helps in

automating the parts of software development that are related to


building, testing, and deploying. Jenkins facilitates continuous
integration and continuous delivery.
 BrowserStack: BrowserStack is a cloud web and mobile testing

platform that can test websites and mobile applications across on-
demand browsers, operating systems, and real mobile devices.
You can access 3000+ different devices and browser versions. You
canrun Selenium, Cypress, Playwright, Puppeteer, Appium, Espresso,
and XCUI tests seamlessly using BrowserStack. It also integrates with
popular CI CD tools like Jenkins, Team City, Circle CI, etc.
Continuous Integration and Continuous
Delivery
 Continuous Integration (CI) :
 CI, as the name suggests, is an approach that happens before one
builds as they are testing code.
 It requires developers to integrate or merge code into a shared
repository continuously.
 It generally helps one to save more costs in the long run as it is
more costly to resolve defects in high-level architecture when
defects are discovered later on in the process.
 It is considered a better way of developing software because it
reduces the number of defects when features are merged and
solves work on machine problems.
 Continuous Delivery (CD) :

 CD, as the name suggests, is an approach that uses automation to

speed the release of new code.

 In this, teams develop, test, and release software in short cycles as

soon as possible.

 It generally ensures that each change that is made is releasable

with complete automation of the release process.

 One can deliver it to production. Its most important factor is the

completeness of checks.

You might also like