Testing Notes
Testing Notes
SDLC is a process followed for a software project, within a software organization. It consists of a detailed plan
describing how to develop, maintain, replace and alter or enhance specific software. The life cycle defines a
methodology for improving the quality of software and the overall development process.. It aims to produce a
high quality software that meets customer expectations.
All these phases are cascaded to each other in which progress is seen as flowing steadily downwards (like a
waterfall) through the phases. The next phase is started only after the defined set of goals are achieved for
previous phase and it is signed off, so the name "Waterfall Model". In this model, phases do not overlap.
Waterfall Model – Advantages
Simple and easy to understand and use
Easy to manage due to the rigidity of the model. Each phase has specific deliverables and a review process.
Phases are processed and completed one at a time.
Works well for smaller projects where requirements are very well understood.
Clearly defined stages.
Well understood milestones.
Easy to arrange tasks.
Process and results are well documented.
Waterfall Model - Disadvantages
No working software is produced until late during the life cycle.
High amounts of risk and uncertainty.
Not a good model for complex and object-oriented projects.
Poor model for long and ongoing projects.
Not suitable for the projects where requirements are at a moderate to high risk of changing. So, risk and
uncertainty is high with this process model.
It is difficult to measure progress within stages.
Cannot accommodate changing requirements.
Adjusting scope during the life cycle can end a project.
SDLC - Iterative Model
In the Iterative model, iterative process starts with a simple implementation of a small set of the software
requirements and iteratively enhances the evolving versions until the complete system is implemented and ready
to be deployed.
An iterative life cycle model does not attempt to start with a full specification of requirements. Instead,
development begins by specifying and implementing just part of the software, which is then reviewed to
identify further requirements. This process is then repeated, producing a new version of the software at the end
of each iteration of the model.
Iterative and Incremental development is a combination of both iterative design or iterative method and
incremental build model for development. "During software development, more than one iteration of the
software development cycle may be in progress at the same time." This process may be described as an
"evolutionary acquisition" or "incremental build" approach."
In this incremental model, the whole requirement is divided into various builds. During each iteration, the
development module goes through the requirements, design, implementation and testing phases. Each
subsequent release of the module adds function to the previous release. The process continues till the complete
system is ready as per the requirement.
Iterative Model - Pros and Cons
The advantages of the Iterative and Incremental SDLC Model are as follows
Some working functionality can be developed quickly and early in the life cycle.
Results are obtained early and periodically.
Parallel development can be planned.
Progress can be measured.
Less costly to change the scope/requirements.
Testing and debugging during smaller iteration is easy.
Risks are identified and resolved during iteration; and each iteration is an easily managed milestone.
Easier to manage risk - High risk part is done first.
With every increment, operational product is delivered.
Issues, challenges and risks identified from each increment can be utilized/applied to the next increment.
Risk analysis is better.
It supports changing requirements.
The disadvantages of the Iterative and Incremental SDLC Model are as follows −
More resources may be required.
Although cost of change is lesser, but it is not very suitable for changing requirements.
More management attention is required.
System architecture or design issues may arise because not all requirements are gathered in the beginning of
the entire life cycle.
Defining increments may require definition of the complete system.
Not suitable for smaller projects.
Management complexity is more.
End of project may not be known which is a risk.
Highly skilled resources are required for risk analysis.
SDLC - Spiral Model
The spiral model combines the idea of iterative development with the systematic, controlled aspects of the
waterfall model. This Spiral model is a combination of iterative development process model and sequential
linear development model i.e. the waterfall model with a very high emphasis on risk analysis. It allows
incremental releases of the product or incremental refinement through each iteration around the spiral.
Based on the customer evaluation, the software development process enters the next iteration and subsequently
follows the linear approach to implement the feedback suggested by the customer. The process of iterations
along the spiral continues throughout the life of the software.
Spiral Model - Pros and Cons
The advantages of the Spiral SDLC Model are as follows −
Changing requirements can be accommodated.
Allows extensive use of prototypes.
Requirements can be captured more accurately.
Users see the system early.
Development can be divided into smaller parts and the risky parts can be developed earlier which helps in
better risk management.
The disadvantages of the Spiral SDLC Model are as follows −
Management is more complex.
End of the project may not be known early.
Not suitable for small or low risk projects and could be expensive for small projects.
Process is complex
Spiral may go on indefinitely.
Large number of intermediate stages requires excessive documentation.
SDLC - V-Model
The V-model is an SDLC model where execution of processes happens in a sequential manner in a V-shape. It
is also known as Verification and Validation model.
The V-Model is an extension of the waterfall model and is based on the association of a testing phase for each
corresponding development stage. This means that for every single phase in the development cycle, there is a
directly associated testing phase. This is a highly-disciplined model and the next phase starts only after
completion of the previous phase.
V-Model - Verification Phases
There are several Verification phases in the V-Model, each of these are explained in detail below.
Business Requirement Analysis
System Design
Architectural Design- Usually more than one technical approach is proposed and based on the technical
and financial feasibility the final decision is taken. The system design is broken down further into
modules taking up different functionality. This is also referred to as High Level Design (HLD).
Module Design-In this phase, the detailed internal design for all the system modules is specified,
referred to as Low Level Design (LLD). It is important that the design is compatible with the other
modules in the system architecture and the other external systems.
Coding Phase
Validation Phases
The different Validation Phases in a V-Model are explained in detail below.
Unit Testing
Integration Testing
System Testing
Acceptance Testing
V-Model - Pros and Cons
The advantages of the V-Model method are as follows −
This is a highly-disciplined model and Phases are completed one at a time.
Works well for smaller projects where requirements are very well understood.
Simple and easy to understand and use.
Easy to manage due to the rigidity of the model. Each phase has specific deliverables and a review process.
The disadvantages of the V-Model method are as follows −
High risk and uncertainty.
Not a good model for complex and object-oriented projects.
Poor model for long and ongoing projects.
Not suitable for the projects where requirements are at a moderate to high risk of changing.
Once an application is in the testing stage, it is difficult to go back and change a functionality.
No working software is produced until late during the life cycle.
SDLC - Agile Model
Agile SDLC model is a combination of iterative and incremental process models with focus on process
adaptability and customer satisfaction by rapid delivery of working software product. Agile Methods break the
product into small incremental builds. These builds are provided in iterations. Each iteration typically lasts
from about one to three weeks. Every iteration involves cross functional teams working simultaneously on
various areas like −
Planning
Requirements Analysis
Design
Coding
Unit Testing and
Acceptance Testing.
At the end of the iteration, a working product is displayed to the customer and important stakeholders.
What is Agile?
In Agile, the tasks are divided to time boxes (small time frames) to deliver specific features for a release.
Iterative approach is taken and working software build is delivered after each iteration. Each build is
incremental in terms of features; the final build holds all the features required by the customer.
Usability Testing
Usability Testing also known as User Experience(UX) Testing, is a testing method for measuring how
easy and user-friendly a software application is.
Checks how easily end users are able to understand and operate the application
Functional Testing
FUNCTIONAL TESTING is a type of software testing that validates the software system against the
functional requirements/specifications.
The purpose of Functional tests is to test each function of the software application, by providing
appropriate input, verifying the output against the Functional requirements.
Following is a step by step process on How to do Functional Testing :
Understand the Functional Requirements
Identify test input or test data based on requirements
Compute the expected outcomes with selected test input values
Execute test cases
Compare actual and computed expected results
Performance Testing
• Load Testing – Testing speed of the system while increasing the load gradually till the expected
customer number (Positive Condition)
• Stress Testing – Testing how the system restarts after we increase the load beyond expected number to
break it (Negative Condition)
Whether the system recovers to normalcy from abnormality caused due to system breakdown.
• Volume Testing – Checks how much volume of data can be handled by the system
Testing Terminology
Ad-hoc Testing
• Software Testing without proper planning and documentation
• Testing carried out with the knowledge of tester about application and tester tests application randomly
without following specification/requirements
Re-Testing
• Testing the functionality repetitively is called re-testing
• Re-testing is introduced in following cases:
Testing functionality with multiple inputs
Testing functionality on different environments (meaning different Browsers & OS)
Testing functionality in the modified build to confirm bug fixes are made correctly
Regression testing
• It is a process of identifying various scenarios in modified build where there is a chance of getting side
effects and retesting these scenarios.
• It is a software testing practice that ensures an application still functions as expected after any
code changes, updates, or improvements. Regression testing is responsible for the overall stability and
functionality of the existing features.
Sanity Testing
• Sanity testing is a kind of Software Testing performed after receiving a software build, with minor
changes in code, or functionality, to ascertain that the bugs have been fixed and no further issues are
introduced due to these changes.
• The goal is to determine that the proposed functionality works roughly as expected.
• It’s narrow and deep.
Smoke Testing
• Testing done to verify that the critical functionalities of software are working fine. It is executed before
any detailed functional testing.
• The main purpose of smoke testing is to reject a software application with defects so that QA team does
not waste time testing broken software application.
• It’s shallow and wide.
UNIT TESTING
• It is a type of software testing where individual units or components of a software are tested. The
purpose is to validate that each unit of the software code performs as expected. Unit Testing is done
during the development (coding phase) of an application by the developers. Unit Tests isolate a section
of code and verify its correctness. A unit may be an individual function, method, procedure, module, or
object.
Objective of Unit Testing:
The objective of Unit Testing is:
1. To isolate a section of code.
2. To verify the correctness of the code.
3. To test every function and procedure.
4. To fix bugs early in the development cycle and to save costs.
5. To help the developers to understand the code base and enable them to make changes quickly.
6. To help with code reuse.
Integration testing is the process of testing the interface between two software units or modules. It focuses
on determining the correctness of the interface. The purpose of integration testing is to expose faults in the
interaction between integrated units. Once all the modules have been unit tested, integration testing is
performed.
Integration test approaches
1.Bottom-Up Integration Testing – In bottom-up testing, each module at lower levels is tested with higher
modules until all modules are tested. The primary purpose of this integration testing is that each subsystem
tests the interfaces among various modules making up the subsystem. This integration testing uses test drivers
to drive and pass appropriate data to the lower level modules.
Advantages:
In bottom-up testing, no stubs are required.
A principle advantage of this integration testing is that several disjoint subsystems can be tested
simultaneously.
Disadvantages:
Driver modules must be produced.
In this testing, the complexity that occurs when the system is made up of a large number of small
subsystems.
2. Top-Down Integration Testing – Top-down integration testing technique is used in order to simulate the
behaviour of the lower-level modules that are not yet integrated. In this integration testing, testing takes place
from top to bottom. First, high-level modules are tested and then low-level modules and finally integrating
the low-level modules to a high level to ensure the system is working as intended.
Advantages:
Separately debugged module.
Few or no drivers needed.
It is more stable and accurate at the aggregate level.
Disadvantages:
Needs many Stubs.
Modules at lower level are tested inadequately.
System Testing:
System Testing is done to check whether the software or product meets the specified requirements or not. It is
done by both testers and developers. It contains the Testings: System testing, Integration Testing. It is done
through more positive and negative test cases.
Acceptance Testing:
Acceptance Testing is done after the system testing. It is used to check whether the software meets the
customer requirements or not. Acceptance testing is used by testers, stakeholders as well as clients. It includes
only Functional Testing and it contain two testing Alpha Testing and Beta Testing.
What is Bug?
A bug is the consequence/outcome of a coding fault.
Defect in Software Testing
A Defect in Software Testing is a variation or deviation of the software application from end user’s
requirements or original business requirements. A software defect is an error in coding which causes incorrect
or unexpected results from a software program which does not meet actual requirements. Testers might come
across such defects while executing the test cases.
Defect Life Cycle or Bug Life Cycle in software testing is the specific set of states that defect or bug goes
through in its entire life. The purpose of Defect life cycle is to easily coordinate and communicate current status
of defect which changes to various assignees and make the defect fixing process systematic and efficient.
Defect Status
Defect Status or Bug Status in defect life cycle is the present state from which the defect or a bug is currently
undergoing. The goal of defect status is to precisely convey the current state or progress of a defect or bug in
order to better track and understand the actual progress of the defect life cycle.
The number of states that a defect goes through varies from project to project. Below lifecycle diagram, covers
all possible states
New: When a new defect is logged and posted for the first time. It is assigned a status as NEW.
Assigned: Once the bug is posted by the tester, the lead of the tester approves the bug and assigns the
bug to the developer team
Open: The developer starts analyzing and works on the defect fix
Fixed: When a developer makes a necessary code change and verifies the change, he or she can make
bug status as “Fixed.”
Pending retest: Once the defect is fixed the developer gives a particular code for retesting the code to
the tester. Since the software testing remains pending from the testers end, the status assigned is
“pending retest.”
Retest: Tester does the retesting of the code at this stage to check whether the defect is fixed by the
developer or not and changes the status to “Re-test.”
Verified: The tester re-tests the bug after it got fixed by the developer. If there is no bug detected in the
software, then the bug is fixed and the status assigned is “verified.”
Reopen: If the bug persists even after the developer has fixed the bug, the tester changes the status to
“reopened”. Once again the bug goes through the life cycle.
Closed: If the bug is no longer exists then tester assigns the status “Closed.”
Duplicate: If the defect is repeated twice or the defect corresponds to the same concept of the bug, the
status is changed to “duplicate.”
Rejected: If the developer feels the defect is not a genuine defect then it changes the defect to
“rejected.”
Deferred: If the present bug is not of a prime priority and if it is expected to get fixed in the next
release, then status “Deferred” is assigned to such bugs
Not a bug:If it does not affect the functionality of the application then the status assigned to a bug is
“Not a bug”.
Defect Life Cycle Explained
Bug Severity or Defect Severity in testing is a degree of impact a bug or a Defect has on the software
application under test. A higher effect of bug/defect on system functionality will lead to a higher severity level.
A Quality Assurance engineer usually determines the severity level of a bug/defect.
What is Priority?
Priority is defined as the order in which a defect should be fixed. Higher the priority the sooner the defect
should be resolved.
Defects that leave the software system unusable are given higher priority over defects that cause a small
functionality of the software to fail.
Types of Severity
In Software Testing, Types of Severity of bug/defect can be categorized into four parts :
Critical: This defect indicates complete shut-down of the process, nothing can proceed further
Major: It is a highly severe defect and collapses the system. However, certain parts of the system
remain functional
Medium: It causes some undesirable behavior, but the system is still functional
Low: It won’t cause any major break-down of the system
Priority Types
Types of Priority of bug/defect can be categorized into three parts :
Low: The Defect is an irritant but repair can be done once the more serious Defect has been fixed
Medium: During the normal course of the development activities defect should be resolved. It can wait
until a new version is created
High: The defect must be resolved as soon as possible as it affects the system severely and cannot be
used until it is fixed
Priority vs Severity: Key Difference
Priority Severity
Defect Severity is defined as
Defect Priority has defined the
the degree of impact that a
order in which the developer
defect has on the operation of
should resolve a defect
the product
Severity is categorized into
Priority is categorized into three five types
types Critical
Low Major
Medium Moderate
High Minor
Cosmetic