Topic 4 - Testing Through The Lifecyle - Part 1
Topic 4 - Testing Through The Lifecyle - Part 1
Topic 4 - Testing Through The Lifecyle - Part 1
Outline
• Software Development models
• Test levels
• Test types
• Maintenance testing
Principles for Good Testing
• Test does not come at the end, but it is integrated in
the model!
• Only test execution is at the end, everything else as
early as possible.
• The earlier one develops test cases, the earlier one
can find bugs or possible bugs.
V-Model
Integration Integration
Technical
Test Plan
Test
Specification
Coding
Validation
• Stubs:
– A Stub is a dummy procedure, module or unit that
stands in for an unfinished portion of a system.
– Four basic types of Stubs for Top-Down Testing are:
1 Display a trace message
2 Display parameter value(s)
3 Return a value from a table
4 Return table value selected by parameter
– More than one stub may be needed, depending on the
number of programs the unit calls.
– Can be generated automatically by a tool.
– Should be kept for regression test.
Example
Integration Integration
Technical
Test Plan
Test
Specification
Coding
Component Testing
Definition
Definition
Definition
Integration Integration
Technical
Test Plan
Test
Specification
Coding
Component Integration Testing
Definition
• Baselines:
– baseline 0: component a a
– baseline 1: a + b
– baseline 2: a + b + c b c
– baseline 3: a + b + c + d
– etc. d e f g
• Need to call to lower
level components not h i j k l m
yet integrated
n o
Component Integration Testing
Top-down testing
• Test commences with the top module in the system
and tests in layers descending through the
dependency graph for the system.
• This may require successive layers of `stub' modules
that replace modules lower in the dependency
graph.
A
Layer I
B C D Layer II
E F G
Layer III
Test
Test A Test A, B, C, D A, B, C, D,
E, F, G
Layer I
Layer I + II
All Layers
Requires
stubs: BCD EFG
Component Integration Testing
Top-down testing
Pro’s Con’s
• provides a limited working system early in • stubs only provide limited
the design process simulations of lower level
• depth first integration demonstrates end- components and could influence
to-end functions early in the development spurious results
process • breadth first means that higher
• early detection of design errors through levels of the system must be
early implementation of the design artificially forced to generate output
structure for test observations
• early testing of major control or decision
points
• this approach may allow an overlap with
Component Testing
Component Integration Testing
Bottom-up testing
• Initiate testing with unit tests for the bottom
modules in the dependency graph
• Candidates for inclusion in the next batch of tests
depend on the dependency structure ( a module
can be included if all the modules it depends on
have been tested (issue about potential
circularity need to consider connected
components).
• Prioritisation of modules for inclusion in the test
sequence should include their `criticality' to the
correct operation of the system.
Component Integration Testing
Bottom-up testing
Component Integration Testing
Bottom-up testing
Pro´s Con´s
• using drivers instead of upper level • unavailability of a demonstrable
modules to simulate the system until late in the
environment for lower level development process
modules
• late detection of system structure
• necessary for critical, low level
system components errors
1 0..* 1 * 1 *
* 1
* *
USAccount OtherAccount
CustomerCare LineItem
* *
* *
Slot
*
1 1 1
CSVdb
....to a hierarchy
Customer Order Package
USAccount OtherAccount
PriceList Component
CustomerCare
Model
JPAccount EUAccount UKAccount
ComponentDB
Slot
ModelDB SlotDB
Tester Tasks with Integration
• Early feedback
– Which interfaces make testing difficult?
– Which components must be delivered first (to ease
integration?)
System Testing
Context
Definition
Integration Integration
Technical
Test Plan
Test
Specification
Coding
System Testing
Definition
Context
Definition
Objectives
Integration Integration
Technical
Test Plan
Test
Specification
Coding
System Integration Testing
Definition
Integration Integration
Technical
Test Plan
Test
Specification
Coding
Acceptance Testing
Definition