7.
1 INTRODUCTION TO TESTING
Introduction to Testing:
Testing is a process, which reveals errors in the program. It is the major quality
measure employed during software development. During software development.
During testing, the program is executed with a set of test cases and the output of the
program for the test cases is evaluated to determine if the program is performing as
it is expected to perform.
7.2 TESTING IN STRATEGIES
In order to make sure that the system does not have errors, the different
levels of testing strategies that are applied at differing phases of software
development are:
Unit Testing:
Unit Testing is done on individual modules as they are completed and
become executable. It is confined only to the designer's requirements.
Each module can be tested using the following two Strategies:
Black Box Testing:
In this strategy some test cases are generated as input conditions that fully
execute all functional requirements for the program. This testing has been uses
to find errors in the following categories:
Incorrect or missing functions
Interface errors
Errors in data structure or external database access
Performance errors
Initialization and termination errors.
In this testing only the output is checked for correctness.
The logical flow of the data is not checked.
White Box testing :
In this the test cases are generated on the logic of each module by drawing
flow graphs of that module and logical decisions are tested on all the cases. It
has been uses to generate the test cases in the following cases:
Guarantee that all independent paths have been Executed.
Execute all logical decisions on their true and false Sides.
Execute all loops at their boundaries and within their operational bounds
Execute internal data structures to ensure their validity.
Integrating Testing :
Integration testing ensures that software and subsystems work together a
whole. It tests the interface of all the modules to make sure that the modules
behave properly when integrated together.
System Testing:
Involves in-house testing of the entire system before delivery to the user. It's
aim is to satisfy the user the system meets all requirements of the client's
specifications.
Acceptance Testing :
It is a pre-delivery testing in which entire system is tested at client's site on real
world data to find errors.
Test Approach :
Testing can be done in two ways:
Bottom up approach
Top down approach
Bottom up Approach:
Testing can be performed starting from smallest and lowest level modules
and proceeding one at a time. For each module in bottom up testing a short
program executes the module and provides the needed data so that the module
is asked to perform the way it will when embedded with in the larger system.
When bottom level modules are tested attention turns to those on the next level
that use the lower level ones they are tested individually and then linked with the
previously examined lower level modules.
Top down approach:
This type of testing starts from upper level modules. Since the detailed
activities usually performed in the lower level routines are not provided stubs are
written. A stub is a module shell called by upper level module and that when
reached properly will return a message to the calling module indicating that
proper interaction occurred. No attempt is made to verify the correctness of the
lower level module.
Validation:
The system has been tested and implemented successfully and thus ensured
that all the requirements as listed in the software requirements specification are
completely fulfilled. In case of erroneous input corresponding error messages
are displayed