Wollo College of Informatics: University
Wollo College of Informatics: University
College of Informatics
Fundamentals of Software Engineering
Course Code: CoSc3061
07/02/2022 1
Chapter 7
Software Testing
07/02/2022 2
Definitions
Software testing is an activity performed for evaluating
Don’t view testing as a “safety net” that will catch all errors that
occurred because of weak software engineering practice.
07/02/2022 4
Who Test the Software?
Developer
Tester
Understands the system but, Must learn about the system,
will test gently but, will attempt to break it
and, is driven by delivery and, is driven by quality
07/02/2022 6
Verification Vs Validation…
07/02/2022 7
Software Verification ….cont
Verification is the process of confirming if the software is
design specifications.
Verification answers the question– "Are we developing this
07/02/2022 9
Software Validation ..cont
Validation is process of examining whether or not the software
validated.
Validation ensures the product under development is as per the user
requirements.
Validation answers the question – "Are we developing the product
which attempts all that user needs from this software ?".
Validation emphasizes on user requirements.
07/02/2022 10
Target of software testing
are -
Errors - These are actual coding mistakes made by developers.
In addition, there is a difference in output of software and
07/02/2022 12
Testing Life Cycle and V-model
Similar to the Waterfall Model
07/02/2022 13
Testing Life Cycle and V-model…
07/02/2022 14
Manual Vs Automated Testing
Testing can either be done manually or using an automated testing tool:
Manual - This testing is performed without taking help of
automated testing tools.
The software tester prepares test cases for different sections and
levels of the code, executes the tests and reports the result to the
manager.
It is time and resource consuming. The tester needs to confirm whether or
not right test cases are used. Major portion of testing involves manual
testing.
Automated -This testing is a testing procedure done with aid of
automated testing tools.
The limitations with manual testing can be overcome using
automated test tools.
15
07/02/2022
Testing Approaches
Tests can be conducted based on two approaches –
1.Functionality testing
2.Implementation testing
When functionality is being tested without taking the
desired results.
On providing input, if the output matches with the desired results,
known to the tester, and testing engineers and end users conduct
this test on the software.
07/02/2022 17
White-box testing
code.
07/02/2022 18
Why Both BB and WB Testing?
Black-box testing White-box testing
Impossible to write a Does not address the
test case for every question of whether or not
a program matches the
possible set of inputs
specification
and outputs Does not tell you if all of
Some code parts may the functionality has been
not be accessible or implemented
available. Does not discover missing
Does not tell if extra program logic
functionality has been
implemented.
07/02/2022 19
Testing Levels
Testing itself may be defined at various levels of SDLC.
and verified.
Testing separately is done just to make sure that there are no
07/02/2022 20
Testing Levels ….Cont.
Unit Testing
While coding, the programmer performs some tests on that
the program are working as per requirement and are error free.
07/02/2022 21
Testing Levels ….Cont.
System Testing
The software is compiled as product and then it is tested as whole.
This can be accomplished using one or more of the following tests:
Functionality testing - Tests all functionalities of the software
against the requirement.
Performance testing - This test proves how efficient the
software is.
It tests the effectiveness and average time taken by the
software to do desired task.
Performance testing is done by means of load testing and stress
testing where the software is put under high user and data load
under various environment conditions.
Security & Portability - These tests are done when the
software is meant to work on various platforms and accessed by
number of persons.
07/02/2022 22
Testing Levels ….Cont.
Regression Testing
Whenever a software product is updated with new
07/02/2022 25
Integration Testing…
Phased integration
A group of related modules are added, each time, to the partial system
under test.
Incremental integration
Only one new module is added, each time, to the partial system under test.
Top-down approach
Bottom–up approach
Mixed approach
07/02/2022 26
Big-Bang Integration
Testing
It is the simplest integration testing approach, where all the modules
making up a system are integrated in a single step.
In simple words, all the modules of the system are simply put together
and tested.
However, this technique is feasible only for very small systems.
The main problem with this approach is that once an error is found
during the integration testing, it is very difficult to limit the error as
the error may potentially belong to any of the modules being
integrated.
Therefore, debugging errors reported during big bang integration
testing are very expensive to fix.
07/02/2022 27
Integration Testing…
07/02/2022 28
Top-Down Integration
Testing
It starts with the main routine and one or two subordinate
routines in the system.
After the top-level ‘skeleton’ has been tested, the immediately
subroutines of the ‘skeleton’ are combined with it and tested.
Top-down integration testing approach requires the use of
program stubs to simulate the effect of lower-level routines
that are called by the routines under test.
A pure top-down integration does not require any driver routines.
07/02/2022 29
Integration Testing…
07/02/2022 30
Bottom-Up Integration
In bottom-up testing, each subsystem is tested separately and
then the full system is tested.
A subsystem might consist of many modules which communicate
among each other through well-defined interfaces.
The primary purpose of testing each subsystem is to test the
interfaces among various modules making up the subsystem.
Both control and data interfaces are tested.
The test cases must be carefully chosen to exercise the
interfaces in all possible manners.
07/02/2022 31
Integration Testing…
Bottom-Up Integration
07/02/2022 32
Mixed Integration
A mixed integration testing follows a combination of top down and
bottom-up testing approaches.
In top-down approach, testing can start only after the top-level
modules have been coded and unit tested.
Similarly, bottom-up testing can start only after the bottom level
modules are ready.
The mixed approach overcomes this shortcoming of the top-down and
bottom-up approaches.
In the mixed testing approaches, testing can start as and when
modules become available.
Therefore, this is one of the most commonly used integration testing
approaches.
07/02/2022 33
Integration Testing…
Sandwich Testing
07/02/2022 34
Testing Levels ….Cont.
Acceptance Testing
When the software is ready to hand over to the customer it has to go
requirements and if user does not like the way it appears or works, it
may be rejected.
Alpha testing - The team of developer themselves perform alpha
testing by using the system as if it is being used in work environment.
They try to find out how user would react to some action in
software and how the system should respond to inputs.
07/02/2022 35
Testing Levels ….Cont.
Acceptance Testing
07/02/2022 36
Difference between testing and debugging
Testing is the process of finding bugs or errors in a
can’t be automated.
07/02/2022 37
Difference between testing and debugging
Testing Debugging
The purpose of debugging is
The purpose of testing is to to correct those bugs found
find bugs and errors during testing.
Testing is done by tester. Debugging is done by
It can be automated. programmer or developer.
It can’t be automated.
It can be done by outsider like
It can be done only by
clients
insider i.e. programmer.
Most of testing can be done
Debugging can’t be done
Without design knowledge. without proper design
knowledge.
07/02/2022 38