Professional Documents
Culture Documents
Structure-based Techniques
(White-box Techniques)
Experience-based Techniques
Choosing Test Techniques
no standards
The test development process
can be done in different ways, from
very informal to very formal.
informal
The level of formality depends on
the context of the testing
organization
industry
maturity of testing and development processes
structured and regulated
time constraints
people involved
formal
Testbasis
Testbasis Test plan
Test basis
Test design
Test
Testbasis
Testbasis specification
condition
Test summary
report
Testbasis
Testbasis
Test basis Test plan The test plan is the document
describing the scope, approach,
Test design
Test
Testbasis
Testbasis specification
resources and schedule of intended
condition
test activities.
Test case [after IEEE 829]
specification
Test summary
report
Contents
Testbasis
Testbasis Test plan
Test basis
1. Test Plan Identifier
2. Introduction
Test
Test design 3. Test items
Testbasis
Testbasis specification 4. Test Conditions to be Tested
condition
(performance attributes)
Testbasis
Testbasis
Test basis
Test plan
The test design specification is a
document specifying the test
Test
Testbasis
Testbasis
Test design
specification
conditions (coverage items) for a test
condition
item, the detailed test approach and
Test case
specification
identifying the associated high-level
test cases.
[after IEEE 829]
Test execution Test procedure
schedule specification
Test summary
report
Test summary
report
Testbasis
Testbasis
Test basis
Test plan
The test case specification is a
document specifying a set of test
Test design
Test
Testbasis
Testbasis specification
cases (objective, inputs, test actions,
condition
expected results, and execution
Test case preconditions) for a test item.
specification [after IEEE 829]
Test summary
report
Testbasis
Testbasis Test plan Contents
Test basis
1. Test case specification identifier
2. Test items
Test design
Test
Testbasis
Testbasis 3. Input values
specification
condition 4. Expected results
5. Environment
Test case
6. Special procedural requirements*)
specification
7. Intercase dependencies
Test summary
report
*) e.g. special performance specifications
Testbasis
Testbasis
Test basis
Test plan
The test procedure specification is
a document specifying a sequence of
Test design
Test
Testbasis
Testbasis specification
actions for the execution of a test.
condition
Test summary
report
Testbasis
Testbasis
Test basis
Test plan
The manual test script describes a
manually executable series of test
Test design
Test
Testbasis
Testbasis specification
actions.
condition
Test summary
report
Testbasis
Testbasis
Test basis
Test plan The test procedure specification
describes how test cases are to be
Test design
Test
Testbasis
Testbasis specification executed
condition
preconditions before starting the test case
Test case
specification technical and logical dependencies
prioritization and risk in the sequence
Test execution Test
procedure
how the test case has to be executed by the
schedule
specification tester manually
should also be usable without much
Test log Incident background knowledge
report
Test summary
report
Testbasis
Testbasis Test plan Contents
Test basis
1. Test procedure specification identifier
2. Test objective
Test design
Test
Testbasis
Testbasis 3. Special requirements
specification
condition (e.g. preconditions, knowledge or special
requirements on the test environment)
Test case 4. Procedures steps
specification Log
Set up
Test execution Test Start
schedule procedure Proceed
specification Measure
Shut down
Test log Incident Restart
report Stop
Wrap up
Test summary Contingencies
report
Testbasis
Testbasis
Test basis
Test plan
The test execution schedule is a
scheme for the execution of test
Test design
Test
Testbasis
Testbasis specification
procedures.
condition
Test summary
report
Testbasis
Testbasis
Test basis
Test plan The test execution schedule defines
when and by whom they will be executed.
Test design
Test
Testbasis
Testbasis
condition
specification Takes factors into account such a:
regression testing
Test case
specification prioritization
logical dependencies
Test
Test execution procedure
schedule specification
Test summary
report
Testing
Static Dynamic
Review Analysis
Walkthrough
Control flow Structure-based test
analysis (white-box testing)
Technical
review
Metrics Experience-based testing
Inspection
Statement coverage
Decision coverage
Single condition coverage
Multiple condition coverage
Path coverage
Inputs
3 integer values that are interpreted as the length of
the sides of a triangle (a, b, c)
Output a b
scalene c a b
isosceles abc
a b scalene
equilateral c
c a=bc
a=b=c isosceles
equilateral
3 integer (int) values representing the 3 sides of a triangle are passed. A text (string) is returned, telling
if this is a special type of triangle or if the values are invalid.
Base class:
equivalence class derived from
input/output data
Represen-
tatives
{list}
{sorted list}
Black-Box
true/false
ascending/
descending
2 3
determine equivalence classes find representatives
1 4 Compose high-level
find parameters tests: take one
equivalence class from
each factor.
Pay attention:
Combine valid classes
only with other valid
classes
Combine one invalid
class only with other
valid classes
(prevents defect-masking)
lb - 1 lb + 1 ub - 1 ub + 1
Definition of
requirements
Acceptance
testing Boundary value analysis can be applied
Functional
system design
System testing at all test levels
Technical Integration
It is easy to use
system design testing
v Effect Negation
Cause
If cause not present - then effect
Or association
If cause A or cause B then effect
AND association
Cause
If cause A and cause B then effect
Effect
Cause
PIN
requested
PIN again
entry
correct
Card
retained
3rd PIN
entry
Cash
incorrect amount
requested
again
Cash Dispense
amount cash
available amount
Cause
How do I get from the cause-effect
Effect
graph to the decision table?
Starting from the effect (action), walk the
Cause
DTT
Test case 1 Test case 2 Test case 3 Test case 4 Test case 5
Decision table
(TC1) (TC2) (TC3) (TC4) (TC5)
R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11
a >= b + c Y N N N N N N N N N N
b >= a + c - Y N N N N N N N N N
c >= a + b - - Y N N N N N N N N
a=b - - - Y Y Y N Y N N N
b=c - - - Y Y N Y N Y N N
a=c - - - Y N Y Y N N Y N
Counter 32 16 8 1 1 1 1 1 1 1 1 counter = 64
no triangle X X X
equilateral X
isosceles X X X
scalene X
math. illogical X X X
simplification 1 simplification 2
Simplifications
Deletion of mathematically illogical cases (e.g., a=b and b=c and a !=c)
Introduction of an ELSE branch for isosceles triangles
R8-
R1 R2 R3 R4 R5 R6 R7 R11
10
a >= b + c Y N N N N N N N E
b >= a + c - Y N N N N N N L
c >= a + b - - Y N N N N N S
a=b - - - Y Y Y N N E
b=c - - - Y Y N Y N
a=c - - - Y N Y Y N
no triangle X X X
equilateral X
isosceles X
scalene X
math. illogical X X X
simplification 1 simplification 2
Software Quality Lab www.software-quality-lab.com - 52 -
Black-box Technique
Decision Table Testing (6)
Applications
embedded software (e.g. mobile phone, navigation
systems)
technical automation
modeling business processes having specific states
dialog-based processes
Event/
Action
Event/
Action
State transition testing is a black box
State State
test design technique in which test
cases are designed to execute valid
and invalid state transitions.
[ISTQB glossary]
Event/ Event/
State transition diagrams can be used
Action Action with reference to a system to show
State State
states
state changes (transitions) between states
Transition
events that trigger state changes
actions which may result from the transitions
show show
add [height < max-1]
remove [height > 1]
initialize add
add [height = max-1]
State transition
State State change Start state
Action
[condition]
Finish state
Event/
Action
Event/ A state table is a table that shows the
Action
State State
resulting state changes for each state
in combination with each possible event.
These may be both valid and invalid
transitions.
[ISTQB glossary]
Show Show
Add [height < max-1]
Remove [height > 1]
Initialize Add
Add [height = max-1]
S1: empty S2: filled S3: full
Remove Remove
Delete [height = 1]
S2 filled - - S2 S2 S2 - S3 - S1 -
S3 full - - - - - S3 - S2 - -
SF finish state - - - - - - - - - -
Remove Show
Filled Full
Initialize
Empty
Add Delete
Filled
7
Delete
1 2 6
Delete Show 5
Filled Full
3 4
Initialize
Empty
Delete
Remove Show Add
Test execution/case
Chain of several state transitions
All leaves in the state transition tree
each combination of state transitions tested
Negative tests are determined with the
expanded state transition tree.
White-box technique
Procedure to derive and/or select test cases based on an
analysis of the internal structure of a component or system.
[ISTQB glossary]
fib1 >= 0 AND fib1 < fib2 AND iterations <= 100
The statement testing techniques derives
T F test cases
to execute specific statements
to increase statement coverage
Coverage
T
Number of statements covered by tests
iterations > 0
How many
fib1 >= 0 AND fib1 < fib2 AND iterations <= 100
test cases T F
are required for
100% statement
coverage?
T
iterations > 0
How many fib1 >= 0 AND fib1 < fib2 AND iterations > 0 Test case
iterations <= 100
test cases
fib1 = 0
are required for T F fib2 = 1
100% statement iterations = -5
coverage?
Advantages Disadvantages
Criterion is easy to Subconditions not
measure considered
Finding dead code Empty ELSE branches
ignored
T F Coverage
Number of decision outcomes covered by tests
Number of all possible decision outcomes
How many
test cases are
T F
required for 100%
decision
coverage?
T
How many fib1 >= 0 AND fib1 < fib2 AND iterations > 0 Test cases
iterations <= 100
test cases are
fib1 = 0
required for 100% T T/F fib2 = 1
decision iterations = 5
fib1 = -1
coverage? F -- fib2 = 1
iterations = 5
Benefits Disadvantages
Better than C0 Subconditions not
(but not much) considered
Good minimum Paths not considered
standard
T F
Is also called
branch condition coverage
C3a, BCC, BC-Coverage
T iterations > 0 Atomic conditions in the example are
F fib1 >= 0
fib1 < fib2
iterations <= 100
iterations > 0
How many
test cases
are required fib1 >= 0 AND fib1 < fib2 AND iterations <= 100
T F
at least for 100%
condition
coverage?
T
iterations > 0
How many
test cases fib1 >= 0 fib1 < fib2 iterations <= 100 iterations > 0 Test cases
are required
fib1 = 3
at least for 100% T T T T/F fib2 = 5
iterations = 10
condition fib1 = -1
coverage? F F F -- fib2 = -3
iterations = 150
Benefits Disadvantages
Takes subconditions C2 may possibly be less
into consideration comprehensive than C0
and C1
T F
Is also called
branch condition combination coverage
multiple condition coverage, C3b, BCC coverage
T iterations > 0
How many
test cases
are required at least T F
for 100%
multiple condition
coverage?
T
for 100% T T F --
fib1 = 0
fib2 = 1
multiple condition Iterations = 150
fib1 = -1
coverage? F F T -- fib2 = -2
iterations = 150
fib1 = -5
F T F -- fib2 = 0
iterations = 150
fib1 = 1
T F F -- fib2 = -2
iterations = 150
fib1 = 0
T T T T/F fib2 = 1
iterations = 5
fib1 = -1
F F F -- fib2 = -2
iterations = 150
Advantages Disadvantages
Takes subconditions Paths not considered
into consideration
Exponential increase in
More comprehensive test cases
than C0, C1 and C2
T iterations > 0
T
F
fib1 = 50
How many test cases F -- fib2 = 0
are required to iterations = 1
fib1 = 0
guarantee 100% T T/F fib2 = 1
path coverage? iterations = 0
fib1 = 0
T T/F fib2 = 1
iterations = 1
fib1 = 0
T T/F fib2 = 1
iterations = 2
[] [] []
fib1 = 0
T T/F fib2 = 1
iterations = 100
Advantages Disadvantages
Comprehensive criterion Potentially infinite paths
(loops)!
impractical
Subconditions not
considered
Definition of
requirements
Acceptance
testing Black-box techniques to create an initial
Functional
system design
System testing collection of test cases
Technical Integration
equivalence partitioning
system design testing
stub
Definition of
requirements
Acceptance
testing Black-box techniques and white-box
Functional
system design
System testing techniques
Technical Integration
equivalence partitioning,
system design testing
Definition of
requirements
Acceptance
testing Mainly black-box techniques
Functional
system design
System testing equivalence partitioning
Technical Integration
boundary value analysis
system design testing
state transition testing
Component Component
specification testing
use case testing
Implementation
requirements-based testing
Definition of
requirements
Acceptance
testing Mainly black-box techniques, usually
Functional
system design
System testing repetition of certain test cases for system
Technical Integration
testing in coordination with the customer
system design testing
Component Component
equivalence partitioning
specification testing
boundary value analysis
Implementation
state transition testing
use case testing
Test condition
An item or result that can be verified by one or more test cases (e.g., a function,
transaction, quality characteristic, ).
Test design
During the analysis and design phase the test criteria are derived from the test
objectives defined in the test plan and the test conditions are refined.
Test case
A test case consists at least of
unique ID
test object
input values and predicted result
constraints
Black-box techniques
Test cases are defined and chosen based on specifications and without
consideration for the internal structure of the system
Equivalence partitioning
partitioning of the test range of the input values into areas of identical effect
Boundary value analysis
Analysis of the boundaries of ranges with identical effect
Decision table testing
Analysis of complex decision specifications
State transition technique
Test cases derived on the basis of state transition trees
Use case technique
Test cases derived on the basis of specified use cases
White-box techniques
Procedures that require information about the inner structure of the test object to
derive and/or select test cases.
C0 statement coverage: Every statement is executed
C1 branch/decision coverage: Every branch is executed
(C2) condition coverage
(C3) multiple condition coverage
(C4) path coverage
Experience-based techniques
Experience-based techniques use the knowledge and experience of
programmers, testers and users
Error guessing
Test cases are derived from experience-based defect lists
Exploratory testing
Testers explore a largely unknown/unspecified system within the scope of test missions
with the help of a test charter