Testing techniques
Felix Reste
Tiberiu Chis
*Note: while all four definitions are commonly used, one distinction assigns the definition to the word in brackets.
OR
SW-QA
Constructive Analytical
(Developer) (Tester)
Functional
quality • Functionality
attributes
Non- • Reliability
• Usability
functional • Efficiency
quality • Maintainability
attributes • Portability
The SW does
Suitability what it has to do
and not more.
Correctness –
Accuracy The SW meets
the requirements.
Completeness –
Functional quality
Functionality Compliance The SW meets all
attributes
the requirements.
The SW has to
Interoperability work with other
SW.
No access to
Security unauthorized
data.
How easy is it to
Usability learn to use the
SW?
How easy is it to
Maintainability make modifications
in the code?
How easy is it to
Portability transfer it to a new
environment?
Outsourcing
Test teams
Team of
developers
Developer Highest
test independence
level
Lowest
independence
level
But:
Testing = Risk assessment/management
Goal: manage risk (and not a perfect software)
Coding
Coding
System
system testing Test
Functional
Tests
Component Tests (Black Box)
Dynamic
Tests
Structural Tests
(White Box)
Module tests
Code inspections, MISRA,
Static Tests
structural analysis
Statement coverage
Dynamic Branch/Decision coverage
White Box Condition Coverage
Path Coverage
Equivalence Partitioning
Boundary Value Analysis
Black Box State Transition
Decision Tables
Static Reviews
Metrics
Reviews
"A process or meeting during which a software product* is examined by
a project personnel, managers, users, customers, user representatives,
or other interested parties for comment or approval.“ (IEEE 1028)
The main advantage of this technique is that with low costs errors are
found in early stages of the project which may save a lot of time and
money in the next stages.
*Note: Here, software product refers to "any technical document or partial document, produced as a deliverable of a software development activity“.
2
3 10
4 11
5 7
12
13 15
16
AUTOLIV Copyright Autoliv Inc., All Rights Reserved
Static Techniques (IV)
White-Box testing
We know the internal structure (knowledge of the source code details)
Black-Box testing
We don’t know the internal structure
read x
read y
yes
x>y
print "x is
greater than y"
yes
x>5
yes
x>y
1 print "x is
greater than y"
yes
x>5 4
print "x is
2 greater than 5" 3 print "x is less
or equal than y"
if (a < 5) if (a < 5)
/* then */ /* else */ /* then */ /* else */
b = 30; b = 15; b = 30; b = 15;
if (a == 1 || x == 5 || y > 3) if (a == 1 || x == 5 || y > 3)
/* then */ /* else */ /* then */ /* else */
b = a * c; /* do nothing */ b = a * c; /* do nothing */
if (a < 5) if (a < 5)
/* then */ /* else */ /* then */ /* else */
b = 30; b = 15; b = 30; b = 15;
if (a == 1 || x == 5 || y > 3) if (a == 1 || x == 5 || y > 3)
/* then */ /* else */ /* then */ /* else */
b = a * c; /* do nothing */ b = a * c; /* do nothing */
50 100
Class 1: x<=49 It would be sufficient
Class 2: x=50 to x=100 to select the values
x=40, x=55 and
Class 3: x>=101 x=120 for test.
Equivalence class of invalid values
They are not expected by the program.
.
DAY
Valid inputs 1, 31
Invalid inputs 0, 32
*Note: “1” was chosen because it is the smallest step defined for the value.
Experience-based techniques
Can be used when for some reason systematic testing is not feasible
The specification is unsuitable to create test cases
There is not enough time to execute a well structured test
Error guessing
Tests are created based on the knowledge, intuition and experience of
the tester
For finding defects which nay be difficult to find with systematic tests
Testing already known or expected SW errors