Software Testing Unit-1
Software Testing Unit-1
SOFTWARE TESTING:
The process of evaluating and verifying that a software product or application
does what it is supposed to do is called software testing.
Benefits of testing:
prevent bugs
reduce development costs
improving performance.
A TEST IN TIME!
Defects in a product can come from any phase of software development
development (coding) is faulty, then the code that realizes the faulty design will
also not meet the requirements.
Thus, it is essential to catch and correct defects in all phases.
COST IMPLICATIONS:
If during requirements capture, some requirements are erroneously captured
and the error is not detected until the product is delivered to the customer, the
organisation incurs the expenses for:
Performing a wrong design based on wrong requirement.
Transforming the wrong design into wrong code during the coding phase
Testing to make sure the product compiles with the (wrong) requirement.
Testing requires analysing and understanding what you are trying to test,
knowing what the correct outcome is, and why you are performing any test.
If tests carried out without understanding why the test is done, this will end up
in running inappropriate tests that do not address what the product should do.
It may even turn out that the product is modified to make sure the tests are
running successfully, even if the product does not meet customer requirements.
White Box Testing – To check the various paths in the code and make sure
they are exercised correctly.
Black Box Testing - Knowing the external functionality of what the product
should do.
Integration Testing – Used to make sure that the different components fit
together.
Internationalization Testing – to ensure that the product works with multiple
languages found in different parts of the world.
Regression Testing – to ensure that the changes work as designed and do not
have any unintended side effects.
It is important to make sure that the tests themselves are not faulty before
getting started to use.
One way of making sure that the tests are tested is to document the inputs and
expected outputs for a given test and validate this description by an expert or
counter-checking this by some means outside the test themselves.
farther”
Testers are probably best equipped to know the problems that the customer
may encounter.
It may not be possible for the testers themselves to carry out preventive action.
Testers would have to work with development engineers to make sure that the
are at stake.
Their careers can be enriching and beneficial to the organisation if they harness
It needs to take into account the requirements- what will be met and what will
not be me.
The planning phase is applicable for both development and testing activities.
At the end of this phase, both project plan and test plan documents are
delivered.
DESIGN:
The purpose of design phase is to figure out how to satisfy the requirement
enumerated in the System Requirements Specification [SRS] document.
It produces the representation that will be used by development phase.
This representation should serve two purposes.
DEVELOPMENT OR CODING:
Design acts as a blueprint for the actual coding to proceed.
programming language.
It produces the software that meets the requirements the design was meant to
satisfy.
This phase also involves the creation of product documentation.
TESTING:
As the program are coded, they are also tested.
As the users start using the product in their environments, they may observe
discrepancies between the actual behaviour of the product and what they were
given to expect.
Requirements get translated into software features, each feature being designed
to meet one or more of the requirements.
For each such feature, the expected behaviour is characterized by a set of test
cases. Each test case is further characterized by:
The environment under which the test case is to be executed.
Inputs that should be provided for that test case.
How these inputs get processed.
What changes should be produced in the internal state or environment.
What outputs should be produced.
The actual behaviour of a given software for a given test case, under given set
of inputs, in a given environment, and in internal state is characterized by:
How these inputs actually get processed.
What changes are actually produced in the internal state or environment
what outputs are actually produced.
If the actual behaviour and the expected behaviour are identical in all their
characteristics, then the test case is said to passed.
If not, the given software is said to have defect on that test case.
There are two ways to increase the chances of product meeting the
requirements expected of it. They are:
1. Quality Control
2. Quality Assurance
QUALITY:
Quality is meeting the requirements expected of the software, consistently and
predictably.
QUALITY CONTROL:
It attempts to build a product, test it for expected behaviour after it is built, and
if the expected behaviour is not the same as actual behaviour of the product,
fixes the product as is necessary and rebuilds the product.
This iteration is repeated till the expected behaviour of the product matches
with actual behaviour for the scenarios tested.
Thus, Quality Control is Defect- detection and defect- correction oriented,
and works on product rather than process.
QUALITY ASSURANCE:
It attempts defect prevention by concentrating on the process of producing the
product rather than working on defect- detection/correction after the product is
built.
The approach of quality assurance is reviewing the design before the product is
built and correct the design errors in the first place.
To ensure the production of a better code, a quality assurance process may
mandate coding standards to be followed by all programmers.
Quality Assurance normally tends to apply to all products that use process.
Since, it continues throughout the life of product, it is everybody’s
responsibility. Hence, it is a staff function.
requirements.
While testing does not guarantee zero defects, effective testing certainly
organization whose goal and charter is to uncover the defects in the product
before it reaches the customer.
VERIFICATION:
The process of evaluating a system or component to determine whether the
products of a given phase satisfy the conditions imposed at the start of that
phase is called verification.
The process helps to ensure that the software fulfils the desired use in an
appropriate environment.
The validation process involves activities like unit testing, integration testing,
system testing and user acceptance testing.
prematurely.
2. The verification for each phase (or each activity in each phase) helps
WATERFALL MODEL:
Waterfall model is the very first model that is used in SDLC. It is also known
as the linear sequential model.
In this model, the outcome of one phase is the input for the next phase.
Development of the next phase starts only when the previous phase is
complete.
Waterfall model is the simple model which can be easily understood and is the
one in which all the phases are done step by step.
Deliverables of each phase are well defined, and this leads to no complexity
and makes the project easily manageable.
Disadvantages of Waterfall model:
Waterfall model is time-consuming & cannot be used in the short duration
projects as in this model a new phase cannot be started until the ongoing phase is
completed.
Waterfall model cannot be used for the projects which have uncertain
requirement or wherein the requirement keeps on changing. Because this model
expects the requirement to be clear in the requirement gathering and analysis phase
itself and any change in the later stages would lead to cost higher as the changes
would be required in all the phases.
V-SHAPED MODEL:
V- Model is also known as
Verification and Validation Model.
In this model Verification & Validation goes hand in hand i.e. development and
is tested.
(iv) Acceptance Testing:
Acceptance testing is associated with the Requirement Analysis phase and is
done in the customer’s environment.
Advantages of V – Model:
It is a simple and easily understandable model.
V –model approach is good for smaller projects wherein the requirement is
defined and it freezes in the early stage.
It is a systematic and disciplined model which results in a high-quality product.
Disadvantages of V-Model:
V-shaped model is not good for ongoing projects.
Requirement change at the later stage would cost too high.
[V-model]