Professional Documents
Culture Documents
● Assuring that a software system
meets a user's needs
veS
r
i
idghsilenvlspeF
o fta
i
c
rcifm o n
atlionD
edtsaiglendvD
P
rylo ga m
n
aidm
itocn
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 19 Slide 7
Program testing
● Can reveal the presence of errors NOT their
absence
● A successful test is a test which discovers one
or more errors
● The only validation technique for nonfunctional
requirements
● Should be used in conjunction with static
verification to provide full V&V coverage
D
e
s
i
gn R
e
pa
i
r R ets
er ero rpair ro progam
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 19 Slide 13
V & V planning
● Careful planning is required to get the most out of
testing and inspection processes
● Planning should start early in the development
process
● The plan should identify the balance between
static verification and testing
● Test planning is about defining standards for the
testing process rather than describing product
tests
ctsep S
y
s
t
s
p
e
c
i
f
t alnceAe
m
a
i
o
nS ys
tinteg rpaelm
i
o
nS
y
d st
i
g em
n S
u
b
s
i
n
t
e
gy
t
e
m
r
a
i
o
n Ddet
a
si
gle
nd Mo
d
u
l
e
a
n
i
t
c
on
d
S ervice cepstanceintegS y
sratieom p
l Su b
sy te
m
n tesintegraion st a
s
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 19 Slide 15
The structure of a software test plan
● The testing process
● Requirements traceability
● Tested items
● Testing schedule
● Test recording procedures
● Hardware and software requirements
● Constraints
spectiognR
e
w
or
k
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 19 Slide 22
Inspection procedure
● System overview presented to inspection team
● Code and associated documents are
distributed to inspection team in advance
● Inspection takes place and discovered errors
are noted
● Modifications are made to repair discovered
errors
● Reinspection may or may not be required
#include <stdio.h>
printarray (Anarray)
int Anarray;
{
printf(“%d”,Anarray);
}
main ()
{
int Anarray[5]; int i; char c;
printarray (Anarray, i, c);
printarray (Anarray) ;
}
139% cc lint_ex.c
140% lint lint_ex.c
lint_ex.c(10): warning: c may be used before set
lint_ex.c(10): warning: i may be used before set
printarray: variable # of args. lint_ex.c(4) :: lint_ex.c(10)
printarray, arg. 1 used inconsistently lint_ex.c(4) ::
lint_ex.c(10)
printarray, arg. 1 used inconsistently lint_ex.c(4) ::
lint_ex.c(11)
printf returns value which is always ignored
LINT static analysis
Use of static analysis
● Particularly valuable when a language such as C
is used which has weak typing and hence many
errors are undetected by the compiler
● Less costeffective for languages like Java that
have strong type checking and can therefore
detect many errors during compilation
D e v o
t
w
a
r
c
r
mt
s
lopratfioenpal sDs
t
r
u
c
p
ge
d
a
m ve
i
f
c
d I
n
t
e
g
i
cr
a
t
e
m
n
etasitgcnal instyT
egrsatm
ed
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 19 Slide 35
Cleanroom process characteristics
● Formal specification using a state transition
model
● Incremental development
● Structured programming limited control and
abstraction constructs are used
● Static verification using rigorous inspections
● Statistical testing of the system (covered in Ch.
21).
a F
s
p
e
lifequtirioencr
io
f z
en
at
ioDe
iv
n
crl
op
m
es
/
w
n
t D
e
l
i
v
e
s
o
f
t
w
ar
m
nts change rquest
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 19 Slide 37
Formal specification and inspections
● The state based model is a system specification
and the inspection process checks the program
against this model
● Programming approach is defined so that the
correspondence between the model and the
system is clear
● Mathematical arguments (not proofs) are used to
increase confidence in the inspection process