Principles of Testing: Envision, Evolve, Unleash
Principles of Testing: Envision, Evolve, Unleash
Principles of Testing
Contents
Envision , Evolve, Unleash
What is a bug?
Quality Definitions
Definitions:
Meeting the customers requirements the first
time and every time
Conformance to a set of customer
requirements that, if met, results in a product
that is fit for its intended use
huge sums
Ariane 5 ($7billion)
Mariner space probe to Venus ($250m)
American Airlines ($50m)
Safety-critical systems
Avr. 4 menus
3 options / menu
system has
20 screens
Exhaustive testing?
It depends on RISK
risk of missing important faults
risk of incurring failure costs
risk of releasing untested or under-tested software
risk of losing credibility and market share
risk of missing a market window
risk of over-testing, ineffective testing
i.e. where to
place emphasis
RISK to
allocate the time available for testing by
testing ...
prioritising
Prioritise
Prioritise tests
tests
so
so that,
that,
whenever
whenever you
you stop
stop testing,
testing,
you
you have
have done
done the
the best
best testing
testing
in
in the
the time
time available.
available.
contractual requirements
legal requirements
industry-specific requirements
e.g. pharmaceutical industry (FDA), compiler
standard tests, safety-critical or safety-related
such as railroad switching, air traffic control
ItIt is
isdifficult
difficultto
todetermine
determine
how
how much
muchtesting
testing is
isenough
enough
but
but ititis
isnot
notimpossible
impossible
specification
execution
recording
check
completion
Test planning
Test specification
specification
execution
Identify conditions
Design test cases
Build tests
recording
check
completion
effective
exemplary
evolvable
Finds faults
Represents others
Easy to maintain
economic
Cheap to use
Test specification
First set
Best set
Time
Most important
test conditions
Least important
test conditions
Test cases
Time
Test execution
specification
execution
recording
check
completion
Execution
Test recording
specification
execution
recording
check
completion
Test recording 1
The test record contains:
identities and versions (unambiguously) of
software under test
test specifications
Test recording 2
Compare actual outcome with expected outcome.
Log discrepancies accordingly:
software fault
test fault (e.g. expected results wrong)
environment or version fault
test run incorrectly
specification
execution
recording
check
completion
execution
recording
check
completion
Coverage
OK
x
x
x
Re-test to check
Regression test
Cant guarantee
to find them all
Regression testing 1
Regression testing 2
Regression testing 3
Expected results
Expected results
A test
inputs
expected
outputs
A Program:
Read A
IF (A = 8) THEN
PRINT (10)
ELSE
PRINT (2*A)
6?
10?
Prioritisation of tests
Prioritising tests
Prioritise
Prioritise tests
tests
so
so that,
that,
whenever
whenever you
you stop
stop testing,
testing,
you
you have
have done
done the
the best
best testing
testing
in
in the
the time
time available.
available.
How to prioritise?
Summary
Envision , Evolve, Unleash