TESTING
FUNCTIONAL TESTING
NAGARAJU DOMALA
Fundamentals
of
Software Testing
Part-2
Why Software Fails?:
Unrealistic or unarticulated project goals
Inaccurate estimates of needed resources
Badly defined system requirements
Poor reporting of the project's status
Unmanaged risks
Poor communication among customers, developers, and users
Use of immature technology
Inability to handle the project's complexity
Programming errors
Changing requirements
Sloppy development practices
Poor project management
Stakeholder politics
Poorly documented code
Software development tools
No testing performed/ not tested thoroughly Nagaraju Domala
Why is Testing Necessary?
Defects occur because:
Human beings are fallible
Time pressure
Complex code
Complexity of infrastructure
Changing technologies
And/or many system interactions.
Now,
Testing will help us to find faults and potential failures during software development, maintenance and operations.
Software tester is to find bugs and find them as early as possible and make sure they are fixed.
Nagaraju Domala
What is Testing?
Software testing is a process used to help identify correctness, completeness, security and quality of
developed computer software.
It proves presence of errors not their absence.
It is constructive destructive process.
Well constructed and executed test is successful when it finds errors that can be fixed.
An unsuccessful test is the one that found no errors.
Testing is context dependent[e-commerce application vs. enterprise web application]
Testing can have the following objectives:
Finding defects
Gaining confidence about the level of quality
Providing information for decision-making
Preventing defects
Nagaraju Domala
Important Terms
Debugging
●
● The process of finding, analyzing and removing the causes of failures in software.
Error
●
● A human action(mistake) that produces an incorrect result.
Bug/ Defect/ Fault
●
● A
A flaw
flaw in
in component/system
component/system that
that can
can cause
cause component
component or
or system
system to
to fail
fail to
to perform
perform its
its required
required function.
function.
●
● Example:
Example: AnAn incorrect
incorrect statement
statement or
or data
data definition.
definition.
●
● When
When aa defect
defect is
is encountered
encountered during
during execution,
execution, it
it may
may cause
cause a
a failure
failure of
of component/system.
component/system.
Failure
●
● Deviation
Deviation of
of the
the component
component oror system
system from
from its
its expected
expected delivery,
delivery, service
service or
or result.
result.
●
● Failures
Failures need
need not
not necessarily
necessarily be
be caused
caused by
by defects;
defects; can
can also
also be
be caused
caused due
due to…
to…
●
● Environmental conditions
Environmental conditions {ex:
{ex: radiation
radiation burst,
burst, pollution
pollution etc..}
etc..}
●
● Intentional damages
Intentional damages {{ ex:
ex: misinterpretations
misinterpretations of
of outputs;
outputs; wrong
wrong input}
input}
●
● Inability
Inability of
of our
our brains
brains to
to handle
handle complexity
complexity –brain
–brain can
can only
only deal
deal with
with aa reasonable
reasonable amount
amount of
of complexity.
complexity.
Nagaraju Domala
Testing and Quality
Testing
●
● The process consisting of all lifecycle activities, both static and dynamic, concerned with planning, preparation and evaluation of
software products and related work products to determine that they satisfy specified requirements, to demonstrate that they are
fit for purpose and to detect defects.
●
● Testing is one component in the overall quality assurance activity that seeks to ensure that systems enter service without defects
that can lead to serious failures.
Quality
●
● Degree
Degree ofof excellence
excellence -- Oxford
Oxford dictionary
dictionary
●
● Conformance
Conformance to to requirements
requirements -- Phil
Phil Crosby
Crosby
●
● Fitness
Fitness for
for purpose
purpose -- Edward
Edward Deming
Deming
●
● Best
Best for
for the
the customer’s
customer’s use
use and
and selling
selling price
price -- Feigenbaum
Feigenbaum
●
● The
The (minimum) loss imparted by the product to society -- Taguchi
(minimum) loss imparted by the product to society Taguchi
●
● The
The totality
totality of
of characteristics
characteristics of
of an
an entity
entity that
that bear
bear on
on its
its ability
ability to
to satisfy
satisfy stated
stated or
or implied
implied needs
needs -- ISO
ISO
●
● The
The degree
degree toto which
which a a component,
component, system
system or
or process
process meets
meets specified
specified requirements
requirements and/or
and/or user/customer
user/customer needs
needs and
and expectations.
expectations. -ISTQB
-ISTQB
●
● Quality
Quality of
of S/W
S/W isis measured
measured inin terms
terms of
of No.
No. of
of defects
defects found,
found, test
test runs,
runs, system
system coverage.
coverage.
Nagaraju Domala
Contd..
Nagaraju Domala
Contd..
Quality Management
●
● Coordinated activities to direct and control an organization with regard to quality. Direction and control with regard to quality
generally includes the establishment of the quality policy and quality objectives, quality planning, quality control, quality
assurance and quality improvement.
Quality Assurance
●
● Part of quality management focused on providing confidence that quality requirements will be fulfilled. - ISTQB
●
● All those planned and systematic activities implemented to provide adequate confidence that an entity will fulfill requirements for quality. - ISO
●
● Example: Validating a project/product, finding defects
Quality Control
●
● The operational techniques and activities that are used to fulfill requirements for quality - ISO
●
● Example: Defining and monitoring the process to prevent defect.
Nagaraju Domala
Seven Principles of Testing
Principle1: Testing shows presence of defects
●
“Testing can show the presence of bugs. It can never show absence of bugs”
Principle 2: Exhaustive testing is impossible
●
Instead of exhaustive testing we use risks and priorities to focus testing efforts
Principle 3: Early testing
●
Test planning can occur as soon as SW requirements have been established
●
Test case design happens as soon as SW design has been defined.
●
Mistake –Thinking of testing only after completion of coding
Principle 4: Defect clustering
●
A small number of modules contain most of the defects discovered during pre-release testing or show the most operational failures.
Nagaraju Domala
Contd..
Principle 5: Pesticide paradox
●
● If the same tests are repeated over and over again, eventually the same set o test cases will no longer find any new bugs
●
● Test cases need to be reviewed and revised, and new and different tests need to be written to exercise the different parts of the SW, potentially to
find more errors
Principle 6: Testing is context dependent
●
● Safety critical software is tested differently from an e-commerce site
Principle 7: Absence of errors fallacy
●
● Finding and fixing defects does not help if the system built is un-usable/does not fulfill the users’
needs and expectations
Nagaraju Domala
How much Testing is Enough?
Deciding how much testing is enough should take account of:
The level of risk(technical/safety/business)
Project constraints such as time and budget
Testing should provide sufficient information to stakeholders to make informed
decisions about the release of the software or system being tested, for the next
development step, or handover to customers.
Nagaraju Domala