Software Testing: ©ian Sommerville 2004 Software Engineering, 7th Edition. Chapter 23 Slide 1
Software Testing: ©ian Sommerville 2004 Software Engineering, 7th Edition. Chapter 23 Slide 1
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide1
Objectives
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide2
Topics covered
System testing
Component testing
Test case design
Test automation
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide3
Component testing
System testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide4
Com
S
y
s
test
te
Soft
Ind
Testing phases
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide5
Defect testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide6
Validation testing
Defect testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide7
T
e
st
T
e
st
T
e
st
T
e
cases
da
ta
r
su
r
t
Design
Pr
epar
e
R
u
o
g
r
a
tes
n
C
m
e
es
o
p
cases
da
tawith
ta
to
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide8
Testing policies
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide9
System testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide10
Integration testing
Bottom-up integration
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide11
A
T
T1
A
T1
T
A
B
T2
T2
T
B
T3
BT3
C
T
C
T4
D
T
T
est
T
est
T
ese
s
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide12
Testing approaches
Architectural validation
System demonstration
Test implementation
Test observation
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide13
Release testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide14
Inp
an
Input
ta
Iebe
vio
S
yste
Ou
hic
e
v
a
the
es
Outpu
esult
O
ede
Black-box testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide15
Testing guidelines
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide16
Testing scenario
A student in Scotland is studying American History and has been asked to write a paper
on Frontier mentality in the American West from 1840 to 1880. To do this, she needs to
find sources from a range of libraries. She logs on to the LIBSYS system and uses the
search facility to discover if she can access original documents from that time. She
discovers sources in various US university libraries and downloads copies of some of
these. However, for one document, she needs to have confirmation from her university
that she is a genuine student and that use is for non-commercial purposes. The student
then uses the facility in LIBSYS that can request such permission and registers her
request. If granted, the document will be downloaded to the registered librarys server
and printed for her. She receives a message from LIBSYS telling her that she will receive
an e-mail message when the printed document is available for collection.
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide17
System tests
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide18
Use cases
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide19
:Com
:W
eath
:W
ea
reque
t)
ackno
repo
t sum
()
send
t)
reply
t)
ackno
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide20
Performance testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide21
Stress testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide22
Component testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide23
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide24
W
e
a
ide
rep
tW
ea
cal
tes
sta
tup
shu
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide25
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide26
Interface testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide27
T
e
st
cas
ACB
Interface testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide28
Interface types
Parameter interfaces
Procedural interfaces
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide29
Interface errors
Interface misuse
Interface misunderstanding
Timing errors
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide30
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide31
Requirements-based testing;
Partition testing;
Structural testing.
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide32
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide33
LIBSYS requirements
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide34
LIBSYS tests
Initiate user search for searches for items that are known to
be present and known not to be present, where the set of
databases includes 1 database.
Initiate user searches for items that are known to be present
and known not to be present, where the set of databases
includes 2 databases
Initiate user searches for items that are known to be present
and known not to be present where the set of databases
includes more than 2 databases.
Select one database from the set of databases and initiate
user searches for items that are known to be present and
known not to be present.
Select more than one database from the set of databases
and initiate searches for items that are known to be present
and known not to be present.
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide35
Partition testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide36
Equivalence partitioning
In
v
aS
lid
in
V
a
lid
yste
Outp
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide37
3
1
4
7
0
Less
Betw
een
0
Mo
e
0
t
Numb
alue
inpu
9999
1
0
0
1
0
5
0
000
999
00
Less
0000
t
Betw
een
000
Mo
e
Input
alues
Equivalence partitions
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide38
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide39
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide40
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide41
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide42
Structural testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide43
T
e
ta
st
T
eCom
sts
Der
v
e
s
T
e
cod
ou
Structural testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide44
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide45
Equ
v
a
len
Elem
Ele
Mid
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide46
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide47
Path testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide48
1
2
3
4
bottom
while
b
5
6
elemA
7
1
elemArr
elem
elemA
[mid]
=
8
1
2
1
3
9
1
41
0
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide49
Independent paths
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14
1, 2, 3, 4, 5, 14
1, 2, 3, 4, 5, 6, 7, 11, 12, 5,
1, 2, 3, 4, 6, 7, 2, 11, 13, 5,
Test cases should be derived so that all of
these paths are executed
A dynamic program analyser may be used to
check that paths have been executed
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide50
Test automation
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide51
T
e
ta
st
d
Spe
tio
gene
a
t
or
Sour
ce
T
e
st
T
e
ta
st
O
acl
r
d
code
mana
ger
Dynam
Pr
o
g
r
a
m
T
e
st
T
e
esul
st
r
anal
yser
being
pr
edi
Ex
ecution
File
Sim
ula
tor
ret por
com
R
e
tT
e
es
gen
a
or
rpo
tsp
A testing workbench
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide52
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide53
Key points
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide54
Key points
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide55