You are on page 1of 10

Introduction to

Performance Testing
What is SDLC?
SDLC is the acronym of Software Development Life Cycle. It is also called as
Software development process. The software development life cycle (SDLC) is a
framework defining tasks performed at each step in the software development
process.

Stage 1: Planning and Requirement Analysis


Requirement analysis is the most important and fundamental stage in SDLC. It is
performed by the senior members of the team with inputs from the customer, the
sales department, market surveys and domain experts in the industry. This
information is then used to plan the basic project approach and to conduct product
feasibility study in the economical, operational, and technical areas. Planning for the
quality assurance requirements and identification of the risks associated with the
project is also done in the planning stage. The outcome of the technical feasibility
Introduction to
Performance Testing
study is to define the various technical approaches that can be followed to
implement the project successfully with minimum risks.

Stage 2: Defining Requirements


Once the requirement analysis is done the next step is to clearly define and
document the product requirements and get them approved from the customer or
the market analysts. This is done through .SRS. . Software Requirement
Specification document which consists of all the product requirements to be
designed and developed during the project life cycle.

Stage 3: Designing the product architecture


SRS is the reference for product architects to come out with the best architecture
for the product to be developed. Based on the requirements specified in SRS,
usually more than one design approach for the product architecture is proposed and
documented in a DDS - Design Document Specification.

This DDS is reviewed by all the important stakeholders and based on various
parameters as risk assessment, product robustness, design modularity , budget and
time constraints , the best design approach is selected for the product.

A design approach clearly defines all the architectural modules of the product along
with its communication and data flow representation with the external and third
party modules (if any). The internal design of all the modules of the proposed
architecture should be clearly defined with the minutest of the details in DDS.

Stage 4: Building or Developing the Product


In this stage of SDLC the actual development starts and the product is built. The
programming code is generated as per DDS during this stage. If the design is
performed in a detailed and organized manner, code generation can be
accomplished without much hassle. Developers have to follow the coding guidelines
defined by their organization and programming tools like compilers, interpreters,
debuggers etc. are used to generate the code. Different high level programming
languages such as C, C++, Pascal, Java, and PHP are used for coding. The
programming language is chosen with respect to the type of software being
developed.

Stage 5: Testing the Product


This stage is usually a subset of all the stages as in the modern SDLC models, the
testing activities are mostly involved in all the stages of SDLC. However this stage
refers to the testing only stage of the product where products defects are reported,
tracked, fixed and retested, until the product reaches the quality standards defined
in the SRS.
Introduction to
Performance Testing
Stage 6: Deployment in the Market and Maintenance
Once the product is tested and ready to be deployed it is released formally in the
appropriate market. Sometime product deployment happens in stages as per the
organizations. Business strategy. The product may first be released in a limited
segment and tested in the real business environment (UAT- User acceptance
testing). Then based on the feedback, the product may be released as it is or with
suggested enhancements in the targeting market segment. After the product is
released in the market, its maintenance is done for the existing customer base.

Waterfall Model design


Waterfall approach was first SDLC Model to be used widely in Software Engineering
to ensure success of the project. In "The Waterfall" approach, the whole process of
software development is divided into separate phases. In Waterfall model, typically,
the outcome of one phase acts as the input for the next phase sequentially.

Following is a diagrammatic representation of different phases of waterfall model.


Introduction to
Performance Testing

The sequential phases in Waterfall model are:

Requirement Gathering and analysis: All possible requirements of the


system to be developed are captured in this phase and documented in a
requirement specification doc.

System Design: The requirement specifications from first phase are studied
in this phase and system design is prepared. System Design helps in
specifying hardware and system requirements and also helps in defining
overall system architecture.

Implementation: With inputs from system design, the system is first


developed in small programs called units, which are integrated in the next
phase. Each unit is developed and tested for its functionality which is referred
to as Unit Testing.

Integration and Testing: All the units developed in the implementation


phase are integrated into a system after testing of each unit. Post integration
the entire system is tested for any faults and failures.

Deployment of system: Once the functional and nonfunctional testing is


done, the product is deployed in the customer environment or released into
the market.

Maintenance: There are some issues which come up in the client


environment. To fix those issues patches are released. Also to enhance the
product some better versions are released. Maintenance is done to deliver
these changes in the customer environment.

AGILE Model design


AGILE methodology is a practice that promotes continuous iteration of development
and testing throughout the software development lifecycle of the project. Both
development and testing activities are concurrent unlike the Waterfall model.
Scrum:
SCRUM is an agile development method which concentrates specifically on how to
manage tasks within a team-based development environment. Basically, Scrum is
derived from activity that occurs during a rugby match. Scrum believes in
empowering the development team and advocates working in small teams (say- 7
to 9 members). It consists of three roles, and their responsibilities are explained as
follows:
Introduction to
Performance Testing

Scrum Master

o Master is responsible for setting up the team, sprint meeting and


removes obstacles to progress

Product owner

o The Product Owner creates product backlog, prioritizes the backlog and
is responsible for the delivery of the functionality at each iteration

Scrum Team

o Team manages its own work and organizes the work to complete the
sprint or cycle

Process flow of Scrum Methodologies:


Process flow of scrum testing is as follows:

Each iteration of a scrum is known as Sprint

Product backlog is a list where all details are entered to get end product

During each Sprint, top items of Product backlog are selected and turned into
Sprint backlog

Team works on the defined sprint backlog

Team checks for the daily work


Introduction to
Performance Testing
At the end of the sprint, team delivers product functionality.

What is Performance Testing


Performance testing is the process of determining the speed or effectiveness of a
computer, network, software program or device. This process can involve
quantitative tests done in a lab, such as measuring the response time or the
number of MIPS (millions of instructions per second) at which a system functions.
Qualitative attributes such as reliability, scalability and interoperability may also be
evaluated. Performance testing is often done in conjunction with stress testing.
Load Testing: Load testing is performed to determine a systems behavior under
both normal and anticipated peak load conditions. It helps to identify the maximum
operating capacity of an application as well as any bottlenecks and determine which
element is causing degradation.
Stress Testing: Stress testing is performed beyond normal usage patterns, in order
to test the systems response at unusually high or peak loads.
Scalability Testing: Scalability testing is conducted in conjunction with capacity
planning, which is used to plan for future growth, such as an increased user base or
increased volume of data. This testing helps to identify a scaling strategy in order to
determine whether you should scale up or scale out.
Endurance Testing: Endurance testing involves testing a system with a significant
load extended over a significant period of time, to discover how the system behaves
under sustained use.

What is Throughput?
Basically, Throughput or TPS (Transaction per Second) is the amount of
transactions produced over time during a test. Its also expressed as the amount of
capacity that a website or application can handle. Also before starting a
performance test it is common to have a throughput goal that the application needs
to be able to handle a specific number of request per hr.
What is Response Time?
Response Time measures the performance of an individual transaction or query.
Response time is the amount of time from the moment that a user sends a request
until the time that the application indicates that the request has completed.

Introduction to JMETER
Introduction to
Performance Testing
JMeter is an open source tool by Apache that can be used as a load testing and
functional testing tool for analyzing and measuring the functionality and
performance of variety of services.
JMeter is very simple and easy to install. Download the .zip or .tgz file and unzip
JMeter file into the directory where you want to install.
http://jmeter.apache.org/
http://wiki.apache.org/jmeter/
http://jmeter-plugins.org/

Apache JMeter breaks down into the elements like


Test Plan: Test Plan which is the main element in JMeter and it cannot be removed.
JMeter test plan is built on the concept of child and parent element.
Thread Group: Thread Group are the main components of test plans. The only type
of element that is outside the thread group is a listener. For a test to have any
functionality it must have thread groups as threads do the actual work of the test. A
thread group can have any number of Samplers and can be of any protocol.
Config Element: Configuration Elements can be used to set up defaults and
variables for later use by samplers. Common Configuration elements are data sets
like CSV Data Set Config and User Defined Variable elements.
Timer: Timers are elements that only slow the rate of requests per second sent by
JMeter.
Sampler: Samplers are the primary elements under thread groups. They are the
element that does all the work making requests.
Logic Controller: Logic Controller elements alter the flow of execution.
Pre and Post Processor: Processors are used to manipulate data.
The most common processor used is the Regular expression extractor which is used
to extract a regular expression from a response.
Assertions: Assertions are used when you want to ensure the response received is
expected.
Listeners: Listeners are essential for analysis when testing. They listen to the
responses and react appropriately given their functions.
Introduction to
Performance Testing

JMeter Test Tutorial


1. Open JMeter
2. Add a thread Group
3. Right Clicking the Test Plan element from the left hand column navigate
Add > Threads (users) > Thread Group

4. Add a sampler. Now right clicking the thread group navigate


5. Add > Sampler > HTTP Request.
6. Add a Listener. Now right clicking thread group again navigate to Add ->
Listener -> View Results Tree.
Introduction to
Performance Testing

7. Under the Port number, give the port number the request supports.

Example: 443

8. Under the HTTP Request, Protocol give the appropriate protocol applicable
and under the Method under the drop down select the appropriate Method
applicable for the call.

Example: Protocol Https, Method POST

9. Under the Path section update the API details.

Example: /demo/login

10.Under the Parameters. Send Parameters with the Request add all the required
parameters. On the left side add the name and the on the right side add the
value for the parameter

Example: Name u Value ashwin

Run the test:

Press the single green button at the top of the screen and wait for the
response. While running a test (or when any sampler is still attempting to make
a sample i.e., has made the request and is waiting for the response) these icons

will turn into so this will tell you when the


Introduction to
Performance Testing
sample/test is running or completed. In the view results tree sampler you can
check the response of the request.

You might also like