Introduction To V&V Techniques and Principles
Introduction To V&V Techniques and Principles
and Principles
Software Design and Development
with a focus on
Software Testing and Verification
Lecture 2
Human-Based Testing
Desk Checking, Walkthroughs, Reviews /
Inspections
Applicable to requirements / specifications,
design, code, proof of correctness arguments,
test plans / designs / cases, maintenance
plans, etc.
Can be extremely effective...
{X2}
SP2 := 4
while SP2 <= X
loop invariant
{ ( i SP2 = 2 &
(i-1)
2 X) & (X = X) }
SP2 := SP2 * 2
end_while
i
{ ( i SP2 = 2 > X & 2(i-1) X) & (X = X) }
post-condition
Machine-Based Testing
Execution of (crafted) test cases
Actual and expected results (i.e., program
behaviors) are compared.
Definitions of TESTING
Hetzel: Any activity aimed at evaluating an
attribute or capability of a program or system.
It is the measurement of software quality.
Beizer: The act of executing tests. Tests are
designed and then executed to demonstrate
the correspondence between an element and
its specification.
Fishermans Dilemma
You have 3 days for fishing and 2 lakes from
which to choose. Day 1 at lake X nets 8 fish.
Day 2 at lake Y nets 32 fish. Which lake do
you return to for day 3?
Does your answer depend on any
assumptions?
Di Lemma
In general, the probability of the existence of
more errors in a section of a program is
directly related to the number of errors
already found in that section.
Testing Techniques
Black-Box: Testing based solely on analysis
of requirements (unit/component
specification, user documentation, etc.). Also
know as functional testing.
White-Box: Testing based on analysis of
internal logic (design, code, etc.). (But
expected results still come from
requirements.) Also known as structural
testing.
Testing Techniques
Black-Box: Testing based solely on analysis
of requirements (unit/component
specification, user documentation, etc.). Also
know as functional testing.
White-Box: Testing based on analysis of
internal logic (design, code, etc.). (But
expected results still come from
requirements.) Also known as structural
testing.