4. 4
TESTING REVIEW
The main objective of software testing is
to design the tests in such a way that it
systematically finds different types of
errors without taking much time and
effort so that less time is required for the
development of the software.
Thatās why we need to choose the best
testing strategy !
5. 5
SOFTWARE TESTING STRATEGY
ā¢ A software testing strategy is the set of
steps that need to be done to assure the
highest possible quality of an end-product.
ā¢ If you choose the strategy that your
project does not require to be perfect,
you waste time and resources for
nothing.
6. 6
VERIFICATION AND VALIDATION (V&V)
ā¢ Verification refers to the set of tasks that ensure that software
correctly implements a specific function.
ā¢ āAre we building the product right?ā
ā¢ Validation refers to a different set of tasks that ensure that the
software that has been built is traceable to customer requirements.
ā¢ āAre we building the right product?ā
8. 8
TESTING CHARACTERISTICS
ā¢ A number of software testing strategies are implemented to provide a
testing framework for software developers with the following general
characteristics:
1. Testing starts from the smallest component level until integration between
components in the entire computer system is achieved.
2. Testing techniques vary according to the time of use.
3. Testing is done by software developers and (for large projects) by an
independent test group.
4. Testing and debugging are separate activities, but debugging should be
accommodated in any testing strategy.
10. 10
TESTING STRATEGY ( contā¦)
ā¢ Unit testing begins at the vortex of the spiral and concentrates on
each unit (e.g., component, class, or WebApp content object) of the
software as implemented in source code.
ā¢ Moving outward along the spiral to integration testing, where the
focus is on design and the construction of the software architecture.
ā¢ Encounter validation testing, where requirements established as
part of requirements modeling are validated against the software
that has been constructed.
ā¢ Finally, system testing, where the software and other system
elements are tested as a whole.
11. 11
SOFTWARE TESTING STEPS
Testing within the context of
software engineering
is actually a series of
four steps that are
implemented sequentially
12. 12
FIRST STEP
ā¢ Tests focus on each component individually,
ensuring that it functions properly as a unit.
ā¢ Called UNIT TESTING.
ā¢ Unit testing makes heavy use of testing techniques
that exercise specific paths in a componentās
control structure to ensure complete coverage and
maximum error detection.
13. 13
SECOND STEP
ā¢ Components must be assembled or integrated to
form the complete software package.
ā¢ INTEGRATION TESTING addresses the issues
associated with the dual problems of verification
and program construction.
ā¢ Test-case design techniques that focus on inputs
and outputs are more prevalent during integration,
although techniques that exercise specific program
paths may be used to ensure coverage of major
control paths.
14. 14
THIRD STEP
ā¢ After the software has been integrated
(constructed), a set of high-order tests is
conducted.
ā¢ Validation criteria (established during
requirements analysis) must be evaluated.
ā¢ VALIDATION TESTING provides final assurance that
software meets all functional, behavioral, and
performance requirements.
15. 15
FOURTH STEP
ā¢ The last high-order testing step falls outside the
boundary of software engineering and into the
broader context of computer system engineering.
ā¢ Software, once validated, must be combined with
other system elements (e.g., hardware, people,
databases).
ā¢ SYSTEM TESTING verifies that all elements mesh
properly and that overall system function and
performance is achieved.
17. 17
DEFINITION
ā¢ Unit testing (or module testing) is a process of testing
the individual subprograms, subroutines, classes, or
procedures in a program. The motivations for doing
this are:
ā¢ Managing the combined elements of testing, since
attention is focused initially on smaller units of the program
ā¢ Eases the task of debugging (the process of pinpointing and
correcting a discovered error), since, when an error is
found, it is known to exist in a particular module.
ā¢ Introduces parallelism into the program testing process by
presenting us with the opportunity to test multiple
modules simultaneously
18. 18
ā¢ Focuses on the smallest core of
software design namely modules
ā¢ Examples : the module itself as a unit,
GUI components (such as windows,
menus, and functions), batch programs,
online programs, and stored
procedures.
ā¢ Conducted to compare the function of
a module to some functional or
interface speciļ¬cation deļ¬ning the
module.
ā¢ Usually white box oriented
19. 19
THE
ADVANTAGES
1. Permits the testing and debugging of
small units, thereby providing a better
way to manage the integration of the
units into larger units.
2. Testing a smaller unit of code makes it
mathematically possible to fully test
the codeās logic with fewer tests.
3. Facilitates automated testing because
the behavior of smaller units can be
captured and played back with
maximized reusability.
20. 20
TESTING STEPS
1. The module interface is tested to ensure that information properly flows
into and out of the program unit under test
2. Local data structures are examined to ensure that data stored
temporarily maintains its integrity during all steps in an algorithmās
execution
3. All independent paths through the control structure are exercised to
ensure that all statements in a module have been executed at least once
4. Boundary conditions are tested to ensure that the module operates
properly at boundaries established to limit or restrict processing
5. And finally, all error-handling paths are tested.
21. 21
THE MODULE INTERFACE TESTING
CHECKLIST
ā¢ Is the number of input parameters equal to the number of
arguments?
ā¢ Is the attribute and parameter argument matched?
ā¢ Is the parameter and argument unit system compatible?
ā¢ Is the number of arguments passed to the called module the same as
the parameter attribute?
ā¢ Are the attributes of the arguments passed to
the called module the same as the attributes
of the parameters?
22. 22
ā¢ Is the system of units of the arguments transmitted to the called module
the same as the system of units of parameters?
ā¢ Is the number of attributes and the order of arguments to the built-in
functions correct?
ā¢ Any references to parameters that don't match the existing entry points?
ā¢ Was the input only argument changed?
ā¢ Is the global variable definition consistent with
the module ?
ā¢ Is the boundary being passed an argument?
THE MODULE INTERFACE TESTING
CHECKLIST (contā¦)
23. 23
HOW WELL IS
THE TEST DONE?
ā¢ In performing the process of module testing, there are
two key considerations:
1. The design of an effective set of test cases,
2. The manner in which the modules are combined to form a
working program.
24. 24
TEST CASE DESIGN
ā¢ Two types of information needed when designing test
cases :
ā¢ A speciļ¬cation for the module : typically deļ¬nes the
moduleās input and output parameters and its function
ā¢ The moduleās source code.
ā¢ Test cases should be designed to uncover errors in
categories :
ā¢ Irregular and inconsistent typing
ā¢ Incorrect initialization or default values
ā¢ Incorrect variable name
ā¢ Inconsistent data types
ā¢ Underflow, overflow and exception addressing
25. 25
THE COMBINED MODULES
ā¢ The manner in which the modules are
combined is important because it has these
implications:
ā¢ The form in which module test cases are written
ā¢ The types of test tools that might be used
ā¢ The order in which modules are coded and tested
ā¢ The cost of generating test cases
ā¢ The cost of debugging (locating and repairing
detected errors)
26. 26
THE APPROACH
1. Test a program by testing each module
independently and then combining the
modules to form the program, or
2. Combine the next module to be tested
with the set of previously tested modules
before it is tested
These approach lead us to
āTHE INTEGRATION TESTā
28. 28
PREFACE
ā¢ After unit testing is completed, all modules must be
integration-tested.
ā¢ During integration testing, the system is slowly built
up by adding one or more modules at a time to the
core of already-integrated modules.
ā¢ The goals of integration testing are to verify that
each module performs correctly within the control
structure and that the module interfaces are correct.
29. 29
DEFINITION
ā¢ Integration testing is the process of verifying the
interactions among software components [5].
ā¢ Integration testing is a systematic technique for
constructing the software architecture while at
the same time conducting tests to uncover errors
associated with interfacing [1].
30. 30
THE GOALS
ā¢ To verify that each module performs correctly within
the control structure and that the module interfaces
are correct.
ā¢ To take unit-tested components and build a program
structure that has been dictated by design.
31. 31
INTEGRATION TESTING STRATEGY
ā¢ Classical : used with hierarchically structured software such as topdown
and bottom-up
ā¢ Modern : typically architecture-driven, which involves incrementally
integrating the software components or subsystems based on identified
functional threads
ā¢ Often an ongoing activity at each stage of development during which
software engineers abstract away lower-level perspectives and concentrate
on the perspectives of the level at which they are integrating.
ā¢ For other than small, simple software, incremental integration testing
strategies are usually preferred to putting all of the
components together at onceāwhich is
often called ābig bangā testing.
32. 32
āBIG BANGā TESTING
ā¢ In the big bang approach, all components are combined
in advance and the entire program is tested as a whole.
ā¢ Chaos usually results!
ā¢ Errors are encountered, but correction is difficult because isolation of
causes is complicated by the vast expanse of the entire program.
ā¢ The emergence of new errors when the previous errors were addressed,
thus creating an endless cycle.
ā¢ Taking the big bang approach to integration is a lazy
strategy that is doomed to failure.
Incremental integration is the antithesis of the big bang approach !
33. 33
INCREMENTAL TESTING
ā¢ The program is constructed and tested in small
increments
ā¢ Errors are easier to isolate and correct;
ā¢ Interfaces are more likely to be tested completely; and
ā¢ A systematic test approach may be applied.
ā¢ Integrate incrementally and testing as you go is a more
cost-effective strategy.
ā¢ When it has been demonstrated that a module performs
properly with the program structure, another module is
added, and testing continues.
ā¢ This process is repeated until all modules have been
integrated and tested.
34. 34
SAMPLE
ā¢ The rectangles represent the six modules
(subroutines or procedures) in the program.
ā¢ The lines connecting the modules represent
the control hierarchy of the program, that is:
ā¢ module A calls modules B, C, and D;
ā¢ module B calls module E;
ā¢ And so on.
SO, HOW DO WE DONE THE TEST?
35. 35
ā¢ BIG BANG TESTING :
1. First, a module test is performed on each of the six
modules, testing each module as a stand-alone entity.
ā¢ The modules might be tested at the same time or in succession,
depending on the environment and the number of people
involved.
2. Finally, the modules are combined or integrated to
form the program.
ā¢ INCREMENTAL TESTING :
ā¢ The next module to be tested is ļ¬rst combined with the
set of modules that have been tested already.
ā¢ Adding the next module to the set or subset of
previously tested modules, is continued until the last
module (module A in this case) is tested.
36. 36
COMPARISON
BIG-BANG TESTING INCREMENTAL TESTING
Requires more work
ā¢ Five drivers and five stubs must be prepared
(assuming we do not need a driver module for
the top module).
Required Less work
ā¢ The bottom-up incremental test would require
ļ¬ve drivers but no stubs.
ā¢ A top-down incremental test would require ļ¬ve
stubs but no drivers.
Modules do not āāsee one anotherāā until the end
of the process
Programming errors related to mismatching
interfaces or incorrect assumptions among
modules will be detected earlier
The errors will not surface until the entire program
has been combined
ā¢ Difficult to pinpoint the error, since it could be
anywhere within the program.
Debugging should be easier
ā¢ Easier to pinpoint the error, because it is likely
that the error is associated with the most
recently added module
37. 37
COMPARISON(contā¦)
BIG-BANG TESTING INCREMENTAL TESTING
The testing of a module will affect only to that
module itself
The testing might result in more thorough testing.
ā¢ Although a module should have been
thoroughly tested previously, perhaps executing
it as a result of other module test will invoke a
new condition, perhaps one that represents a
deļ¬ciency in the original test.
Use less machine time Use less machine time
More opportunity for parallel activities
ā¢ Might be of signiļ¬cance in a large project (many
modules and people), since the headcount of a
project is usually at its peak at the start of the
module test phase.
Less opportunity for parallel activities
39. References
Lewis, W. E. (2009). Software Testing And Continuous Quality
Improvement ed. 3rd. Auerbach publications.
02
Majchrzak, T. A. (2012). Improving Software Testing: Technical And
Organizational Developments. Springer Science & Business Media.
03
Myers, G. J., Sandler, C., & Badgett, T. (2012). The Art Of Software
Testing. John Wiley & Sons.
04
Roger, S. P., & Bruce, R. M. (2019). Software Engineering: A
Practitionerās Approach Ed.9th. McGraw-Hill Education.
01
Bourque, P., Dupuis, R., Abran, A., Moore, J. W., & Tripp, L. (2014).
The guide to the software engineering body of knowledge. IEEE
software.
05