ST Unit-I (A)
ST Unit-I (A)
T-I(
A)
I
NTRODUCTION
1.PURPOSEOFTESTI
NG
1.
1.Whatwedo
Testingisasyst
ematicappr oachthatthegivenoneiscorrectornot.
I
nt esti
ngeachandev erymodul eistested.
Testingfi
ndoutthebugsi ngivensoftware.
Testdesignandtest
ingt akeslongerthanprogram desi
gnandcodi ng.
Bugsar eduetoimperfectCommuni cationamongpr ogrammer s.
1.
2.Pr
oduct
ivi
tyandQual
i
tyi
nSof
twar
e
Onceinproducti
on,eachandev eryst
ageissubjectedtoquali
tycont
rolandtesti
ngfrom
componentsourceinspect
iontof i
nalt
esti
ngbef or
eshippi
ng.
Ifanydefectsfoundatanyst ageinanypar tofi twil
lbesentbackf orreworkand
corr
ecti
on.
Theproducti
vit
yismeasur edbyt hesum ofthecost softheresour
ces,thereworkand
thefai
l
edcomponent sandt hecostofquali
tyassuranceandtesti
ng.
Bytest
ingwegett hequali
tyofsoftware.
Ifwegivetheguarant
eeforthequalit
yofapr oducttheni
tiscall
edQuali
tyAssurance.
1.
3.Goal
sforTest
ing
Testi
ngandt estdesignasapar tsofqual
it
yassurance,shoul
dalsof ocusonbug
prev
enti
on.
Totheextentthattest
ingandt estdesi
gndonotpr
ev entbugs,t
heyshouldbeabl
eto
di
scoversymptomscausedbybugs.
Thetwomaj orgoal
soft est
ing
1.BugPreventi
on
2.BugDiscover
y
1.BugPr
event
ion:
2.Bugdiscovery:
Whichisconsideredasthesecondarygoalfortesti
ng.
I
tisperfor
medwhent hepri
mar ygoalfai
l
stopr eventthebugs.
Asingl
ebugcanhav emanyr easonsfori
tsoccur r
ence.
Justbydetermini
ngthattheprogram i
sincorr
ectdoesn’trevealthediscover
yofbugs
Eachsympt om canbereveal
edonl ybyperf
ormi ngmanysmal ldet
ail
edt est
soneachof
t
hei
ndi
vi
dual
component
s.
1.
4.Phasesi
naTest
er’
sMent
alLi
fe
Whytesti
ng?–What’
sthepur
poseoftest
ing?
Theatt
itudi
nalpr
ogr
essi
onofatest
eri
scharact
eri
zedbyt
hef
oll
owi
ng5phases.
Phase0:Ther
e’snodi
ff
erencebetweent
esti
nganddebugging.
Herether
eisnoeff
ect
ivetest
ing,
noqual
it
yassuranceandnoqual
i
ty.
Phase3:Thepur poseoftest
ingisnottopr ov
eany thi
ng,
buttoreducethepercei
vedriskofnot
w workingtoanacceptabl
ev al
ue.
Heretestingimplementsthequali
tycont rol
.Totheext
entthattesti
ngcatchesbugsand
totheextentthatthosebugsarefixed,testi
ngdoesimpr
ov etheproduct
.
Ifatesti
spassed, t
hentheproduct’squalit
ydoesnotchange,butourpercept
ionofthat
quali
tydoes.
Phase4:Herewhattesti
ngcandoandcan’tdo.
Test
abi
li
tyist
hegoal f
ort
wor easons:
1.Reducethel
aboroftest
ing.
2.Test
ablecodehasfewerbugsthancodet
hat
’shar
dtot
est
.
1.
5.TestDesi
gn
Weknowt hatthesoft
warecodemustbedesi gnedandtest
ed,butmanyappeartobe
unawarethatteststhemsel
vesmustbe designed and test
ed.Testsshoul
d be pr
operl
y
desi
gnedandtestedbefor
eappl
yi
ngitt
otheact
ual code.
I
ntestdesi
gnphaset hegiv
ensy st
em istestedthatbugsar
epr
esentornot
.Iftest
desi
gni
snotformal
lydesignednoonei ssurewhethert
herewasabugornot
.So,t
estdesign
i
saimport
antonetogetthesy st
em wi
thoutanybugs.
1.
6.Test
ingI
sn’
tEv
ery
thi
ng
Wemustf
ir
str
evi
ew,
inspect
,read,
dowal
kthr
oughsandt
hent
est
.
Themaj
ormet
hodsi
ndecr
easi
ngor
derofef
fect
ivenessasf
oll
ows:
I
nspecti
onmethods:I
tincl
udeswal
kthr
oughs,deskchecki
ng,
formali
nspect
ionandcode
readi
ng.
Thesemethodsappeartobeaseff
ecti
veastest
ing,
butthebugscaughtdonotcomplet
ely
overl
oad.
Desi
gnst
yle:I
tincl
udest
est
abi
l
ity
,opennessandcl
ari
tyt
opr
eventbugs.
Stati
cAnal
ysi
sMet hods:I
tincl
udesofst
rongt
ypi
ngandt
ypechecki
ng.I
tel
i
minat
esanent
ir
e
categor
yofbugs.
Languages:Thesour
cel
anguagecanhel preducecer
tai
nkindsofbugs.Progr
ammersfi
nd
new kindsofbugsinnew languages,so t
hebug rateseemsto beindependentoft
he
l
anguagesused.
Desi
gnmethodologyandDevelopmentEnvi
ronment
:Designmethodol
ogycanpr
eventmany
ki
ndsofbugs.Devel
opmentprocessusedandtheenvi
ronmenti
nwhichwhatmet
hodologyi
s
embedded.
1.
7.Thepest
ici
depar
adoxandt
hecompl
exi
tyBar
ri
er
1.Pest
ici
deParadox:Ev
erymethodyouusetopr
eventorf
indbugsl
eav
esar
esi
dueofsubt
ler
bugsagai
nwhichthosemethodsarei
nef
fect
ual
.
2.Compl
exit
yBar
ri
er:Sof
twar
ecompl
exi
tygr
owst
othel
i
mit
sofourabi
l
ityt
omanaget
hat
compl
exi
ty.
2.MODELFORTESTI
NG
2.
1.ThePr
oject
Ar
eal
-wor
ldcont
extchar
act
eri
zedbyt
hef
oll
owi
ngmodel
proj
ect
.
Appl
icati
on:Iti
sareal
-t
imesystem thatmustpr
ovi
deti
mel
yresponsest
ouserr
equest
sfor
ser
vices.I
tisanonl
i
nesyst
em connectedt
oremotet
ermi
nal
s.
St
aff:Theprogr
ammingst
affconsist
soft wentyt
othi
rt
yprogr
ammersdependsupont
he
pr
oject
,butnott
oobi
gtomanage.Speci
ali
stsar
eusedf
orsyst
em’
sdesi
gn.
Schedul
e:Theprojectwi
l
ltake24mont
hsfr
om thestar
tofdesi
gntof
ormalaccept
ancebyt
he
cust
omer.Acceptancewil
lbefol
l
owedbya6-monthcutov
erper
iod
Speci
ficat
ion:meansr
equi
rement
s.Funct
ional
l
ydet
ail
eduserr
equi
rement
sar
edocument
ed
here.
AcceptanceTest:Thesystem wil
lbeacceptedonl
yafteraformalaccept
ancetest
.Atfi
rstt
he
customerwi l
li
ntendtodesigntheaccept
ancetest
,butlat
eritwi
llbecomethesoft
waredesi
gn
team’sresponsi
bil
it
y.
Personnel(
Programmers):Thestaf
fisprof
essionalandexper
iencedi
nprogrammingandin
theappli
cat
ion.Atl
easthalfoft
hestaf
fknowsthesourcel
anguageinbefor
e.Maybeone-
thi
rd
arejuni
orpr
ogrammer s.
St
andar
ds:Pr
ogr
ammi
ngandt
estst
andar
dsexi
standar
eusual
l
yfol
l
owed.
Object
ives:Thesyst
em ist hefi
rstofmanysimi
l
arsy
stemst hatwil
lbei
mplement
edi
nthe
fut
ure.Not wowi
ll
bei dent
ical
,buttheywi
l
lhav
e75%ofthecodeincommon.
Source:One-
thi
rdofthecodeisnew,one-
thi
rdextr
act
edfrom aprevious,r
eli
abl
e,butpoor
ly
documentedsystem,
andone-t
hir
disbei
ngrehost
ed(fr
om otherl
anguageorcomputer)
.
2.
2.Ov
erv
iew
Theprocessst
art
swit
haprogr
am embeddedinanenv
ironment
,suchasacomputer
,an
oper
ati
ngsystem,
oracal
l
ingpr
ogr
am.Thi
sunderst
andi
ngl
eadsustocreat
ethr
eemodel
s:
Amodel
oft
heenvir
onment,
Amodel
oft
heprogram,
Amodel
oft
heexpectedbugs.
Fr
om thesemodel swecr eateasetoftest
s,whi
char et
henexecuted.
Ther esultofeacht estiseit
herexpect
edorunexpected.
I funexpected,i tmayl eadust orevi
sethetest,ourmodelorconceptofhow t
he
pr
ogram behav es,ourconceptofwhatbugsarepossi bl
e,ort
heprogr
am i
tsel
f.
Onl yrar
elywoul dweat tempttomodi f
ytheenv
ironment.
2.
3TheEnv
ironment
Apr
ogr
am’
senv
ironmenti
sthehar
dwar
eandsof
twar
erequi
redt
omakei
trun.
Foronli
nesystemst heenvi
ronmentmayincludecommunicati
onslines,othersyst
ems,
ter
minal
s,andoperator
s.Theenvir
onmental
soincludesallpr
ogr
amst hatint
eractwithandare
usedtocr eat
et heprogram undertest
,suchasoper at
ingsyst
em,l oader,li
nkageedi t
or,
compil
er,
util
it
yrout
ines.
Iftest
ingr
eveal
sanunexpectedresul
t,wemayhavetochangeourbel
ief
s(ourmodelof
t
heenv ironment
)tofindoutwhatwentwr ong.Butsometi
mest heenvir
onmentcouldbe
wrong:
t hebugcoul
dbeinthehardwareorfi
rmwareaf
teral
l
.
2.
4.ThePr
ogr
am
Pr
ogramsaretoocompl
icat
edtounder
standi
ndet
ail
.Theconceptoft
hepr
ogr
am i
s
t
obesimpli
fi
edi
nordert
otesti
t.
Ifsi
mplemodeloft
heprogr
am doesn’
texpl
aint
heunexpect
edbehavior
,wemayhav
e
t
omodi f
ythatmodelt
oincl
udemorefactsanddetai
l
s.Andifthatf
ail
s,wemayhavet
o
modif
ytheprogr
am.
2.
5.Bugs
Bugsaremoreinsidi
ous(cunni
ng/har
mf ul)t
hanev
erweexpectthem t
obe.
Anunexpect
edt estresul
tmayleadustochangeournotionofwhatabugi sand
ourmodelofbugs.
Someoptimist
icnotionsthatmanyprogrammersortest
ershaveaboutbugsare
usual
lyunablet otestef f
ect
ivel
yand unabletojusti
fythe di
rt
yt est
s most
progr
amsneed.
Ther
ear
e9Hy
pot
hesesr
egar
dingBugs.
1)Beni
gnBugHy
pot
hesi
s:
Thebel
i
eft
hatt
hebugsar
eni
ce,
tame(
mil
d)&l
ogi
cal
.
Thesebugsar
enotdanger
ousbugs.
2)Bugl
ocal
i
tyhy
pot
hesi
s:
Bel
i
eft
hatbugsar
elocal
i
zed.
Thebel
i
eft
hatabugdi
scov
eredwi
thi
nacomponentef
fect
sonl
ythat
component
sbehav
ior
.
Subt
le(
nar
row)bugsaf
fectt
hatcomponent&ext
ernal
toi
t.
3)Cont
rol
Domi
nancehy
pot
hesi
s:
Thebel
i
eft
hater
ror
sint
hecont
rol
str
uct
ureofpr
ogr
amsdomi
nat
ethebugs.
Bel
i
eft
hatmoster
ror
sar
eincont
rol
str
uct
ures,
butdat
afl
ow&dat
ast
ruct
ure
er
ror
sar
ecommont
oo.
Subt
lebugsar
enotdet
ect
abl
eonl
ythr
oughcont
rol
str
uct
ure.
4)Code/
dat
aSepar
ati
onhy
pot
hesi
s:
Bel
i
eft
hatt
hebugsr
espectt
hesepar
ati
onofcode&dat
a.
5)Li
nguaSal
vat
orEsthy
pot
hesi
s:
Bel
i
eft
hatt
hel
anguagesy
ntax&semant
icsel
i
minat
emostbugs.
But
,suchf
eat
uresmaynotel
i
minat
eSubt
leBugs.
6)Cor
rect
ionsAbi
dehy
pot
hesi
s:
Bel
i
eft
hatacor
rect
edbugr
emai
nscor
rect
ed.
Subt
lebugsmaynot
.
7)Si
l
verBul
l
etshy
pot
hesi
s:
Bel
i
eft
hat-l
anguage,
desi
gnmet
hod,
repr
esent
ati
on,
env
ironmentet
c.gr
ant
i
mmuni
ty(
resi
stance)f
rom bugs.
8)Sadi
sm Suf
fi
ceshy
pot
hesi
s:
Bel
i
eft
hatasadi
sti
cst
reak,
lowcunni
ngel
i
minat
emostbugs.
Toughbugsneedmet
hodol
ogy&t
echni
ques.
9)Angel
i
cTest
ershy
pot
hesi
s:
Bel
i
eft
hatt
est
ersar
ebet
teratt
estdesi
gnt
hanpr
ogr
ammer
satcodedesi
gn.
2.
6.Test
s
Test
sar
eFor
mal
procedur
es.
I
nputpr
epar
ati
on,
out
comepr
edi
cti
onandobser
vat
ion,
test
sdocument
ati
onand
commandexecut
ionar
esubj
ect
edt
oer
ror
s.
Anunexpect
edt
estr
esul
tmayl
eadust
orev
iset
het
estandt
estmodel
s.
2.
7.Test
ingandLev
els
Wedot hreedist
inctkindsoft
esti
ngonat
ypi
calsof
twar
esy
stem:uni
t/component
t
est
ing,i
ntegr
ationtesti
ng,andsyst
em t
esti
ng.
Theobject
ivesofeachkindar
edi
ff
erentandt
her
efor
e,wecanexpectt
hemi
xoft
est
met
hodsusedtodiff
er.Theyar
e:
1)Uni
t,Uni
tTest
ing:
2)Component
,ComponentTest
ing:
3)I
ntegr
ati
on,
Int
egr
ati
onTest
ing:
Integrat
ion i s a process by whi ch component s are aggr
egated to createl arger
component s.
InIntegrati
onTest ing,i
ndi
vidualsoftwaremodulesar eint
egrat
edlogicall
yandt estedas
agr oup.
Integrat
iont esti
ngbecomesnecessar ytover
if
ythesof twaremoduleswor kinunity
Alsoaf t
eri ntegrat
ingtwodi f
ferentcomponentst ogetherwedot heintegrat
iont est
ing.
Asdi spl
ay edi ntheimagebel owwhent wodif
ferentmodul es‘
ModuleA’ and‘ ModuleB’
areintegratedt hentheint
egrati
ont est
ingi
sdone.
I
ntegr
ati
ont
est
ingi
sdonebyaspeci
fi
cint
egr
ati
ont
esterordev
eloper
.
I
ntegr
ati
ont
est
ingfol
l
owstwoapproachknownas‘TopDown’approachand‘
Bot
tom
Up’
appr
oachasshowni
nthei
magebel
ow:
4)Sy
stem,
Syst
em Test
ing:
Syst
em Test
ingisalev
eloft
hesof
twar
etest
ingwher
eacompl
eteandi
ntegr
ated
soft
war
eistested.
Insyst
em t
est
ingt
hebehavi
orofwholesyst
em/pr
oducti
stest
edasdef
inedbyt
he
scopeoft
hedevel
opmentpr
ojectorpr
oduct.
Sy
stem test
ingi
smostof t
ent hefinaltesttoveri
fythatthesy
stem t
obedel
i
ver
ed
meetst
hespecif
icat
ionanditspurpose.
Sy
stem t
esti
ngiscarri
edoutbyspeciali
ststest
ersordevel
oper
s.
Di
ff
erencebet
weenUni
tTest
ingandI
ntegr
ati
onTest
ing
Uni
tTest
ing I
ntegr
ati
onTest
ing
1 I
tdonotoccur
saf
terandbef
oreof I
toccur
saf t
erUnitTest
ingandbef
ore
any
thi
ng. Syst
em Testi
ng.
2 I
tisnotabbr
evi
atedbyanyname. Iti
sabbrevi
atedas“I
&T”t
hatiswhy
sometimesalsocal
l
edInt
egrat
ionand
Testi
ng.
3 I
tisnotf
urt
herdi
vi
dedi
ntoany
. I
tisfurt
herdiv
idedi
ntoTop-down
I
ntegrat
ion,
Bottom-
UpIntegrat
ionandso
on.
4 I
tmaynotcat chintegr
ati
onerrors,or Int
egrat
iontest
inguncoversanerrort
hat
othersystem-wideissuesbecause ari
seswhenmodul esareintegr
atedto
unitt
estingonlyteststhe buil
dtheoveral
lsyst
em.
functi
onalit
yoftheunitsthemselves.
5 Thegoalofuni
ttest
ingistoisol
ate Thegoal ofIntegrat
ionTesti
ngisto
eachpar
toftheprogram andshow combi nedmodul esintheappli
cat
ionand
thatt
hei
ndivi
dualpartsar
ecor r
ect
. test
edasagr oupt oseethatt
heyare
workingfine.
6 I
tdoesnotf
oll
owany
thi
ng. Itf
oll
owsuni
ttest
ingandpr
ecedes
syst
em t
esti
ng.
7 Itobv
iousl
yst
art
sfr
om t
hemodul
e Itobv
iousl
yst
art
sfr
om t
hei
nter
face
speci
fi
cati
on. speci
fi
cati
on.
8 Unitt
est
ingal
waystest
sthev
isi
bil
i
ty I
ntegrati
ont
est
ingal
waysteststhe
ofcodei
ndetai
ls. v
isibi
l
ityoft
hei
ntegr
ati
onstruct
ure.
9 Unitt
est
ingal
wayst
est
sthev
isi
bil
i
ty I
ntegrati
ont
est
ingal
waysteststhe
ofcodei
ndetai
l v
isibi
l
ityoft
hei
ntegr
ati
onstruct
ure.
10 I
tdefi
nit
elypaysatt
ent
iontothe I
tdefi
nit
elypay
sat
tent
iontot
he
behav
iorofsingl
emodules. i
ntegr
ati
onamongmodules.
11 I
tisonlyt
heki
ndofWhi
teBox I
tisbot
ht heki
ndofBl
ackBoxandWhi
te
Test
ing. BoxTest
ing.
Di
ff
erencebet
weenSy
stem Test
ingandI
ntegr
ati
onTest
ing
.
Sy
stem Test
ing I
ntegr
ati
onTest
ing
1.I nsy st
em t est i
ngwet estthecompl ete 1. In i nt egration t esting we t est the
sy stem asawhol etocheckwhet hert he modul es t o see whet her they ar e
sy stem i spr oper l
ywor kingornotmeans i ntegrat i
ngpr oper l
yornotbycombi ning
aspert her equirement sornot . themodul esandt est edasagr oup.
2.I nsy stem t estingtest ersal way shav e 2.I ni ntegr ati
on t est i
ng t ester
shav et o
toconcent rateonbot hf unctionalandnon concent rat e onf unct ionalt esti
ng means
funct i
onalt estingl i
keper formance,l oad, mai nf ocus on how t wo modul es are
stress,secur i
ty,recov er ytest i
ngandso combi nedandt est edasagr oup.
on.
3.Forper forming t hist esting system 3.Forper formi ngt hist esti
ngsy stem must
mustbei nt egratedtest ed. beuni ttest edbef ore.
4. I t st arts f rom t he r equirement s 4.Itstartsf rom t hei nterfacespecif i
cat
ion.
speci fications.
5.Sy stem Test i
ng does nott estt he 5.Integrat ionTest ingt estthev i
sibil
it
yof
visibil
ityofcode. theintegr ationst ructur e.
6.I tdoesnotr equir
eanyf ramemeans 6. I t r equi res some f rame means
scaf folding. scaffolding.
7InSy st
em Test i
ngTesterpaysattent
ion 7. In Int
egrat
ion Testing Test
er pays
tothesystem functi
onal
it
y. att
enti
on t o t he i nt
egrat
ion among
modules.
8. It pays at tent
ion to the sy st
em 8.I tpay s att
enti
on t ot he I
ntegr
ati
on
funct
ionali
ty. amongmodul es.
9.Iti
sal waysonl ytheki
ndofBl ackBox 9.I tisaki ndofbot hWhiteBoxTest i
ng
Testi
ng. andBlackBoxTesting.
2.
8.TheRol
eofModel
s
Usedf
ort
het
est
ingpr
ocessunt
ilsy
stem behav
iori
scor
rectorunt
ilt
hemodel
is
i
nsuf
fi
ci
ent(
fort
est
ing)
.
Unexpect
edr
esul
tsmayf
orcear
evi
sionoft
hemodel
.
Ar
toft
est
ingconsi
stsofcr
eat
ing,
sel
ect
ing,
expl
ori
ngandr
evi
singmodel
s.
Themodel
shoul
dbeabl
etoexpr
esst
hepr
ogr
am.
3.CONSEQUENCESOFBUGS
3.
1.I
mpor
tanceofBugs:
Theimport
anceofbugsdependsonmet
ri
csl
i
kef
requency
,cor
rect
ioncost
,inst
all
ati
oncost
,
andconsequencescost
Fr
equency
:
Frequencyofabugr efer
st otherateatwhichitoccurs.
Themor efrequent
lyitoccurs,t
hemor ewillbeit
sfrequency
.
Paymor eattent
iontothemor efrequentbugtypes.
Cor
rect
ionCost
:
I
nst
all
ati
onCost
:
I
nstal
lat
ioncostdependsont henumberofi nst
all
ati
onsi
.e.thi
scostrel
iesont
he
di
ff
erentappl
i
cati
onsthatareusedinthesyst
em.
Asthenumberofappli
cati
onsincr
eases,t
heassociat
edcostal
soincr
eases.
Consequences:
Itdependsupont
heconsequences(
aff
ect
s)ofbugs.
Therearemanyconsequencesofbugswhichmakesthesy
stem ei
therf
rom mi
l
d
toinfect
ious.
A met
ri
cfort
hei
mpor
tanceofbugi
s
I
mportance of bug(
$) = Fr
equency
*[Cor
rect
ion cost + I
nst
all
ati
on cost +
Consequenti
alcost
]
3.
2.ConsequencesofBugs:
Theconsequencesofbugscanr
angef
rom mi
l
dtoinf
ect
ious.
Theconsequencesofabugcanbemeasur
edint
ermsofhumanr
athert
hanmachi
ne.
Thev
ari
ousbugconsequencesar
easf
oll
ows
1)Mi
l
d
• Appear
anceofbugsuchasmi
sspel
l
edout
putormi
sal
i
gnedpr
int
-out
.
2)Moder
ate
• Thi
sconsequenceef
fect
stheper
for
manceoft
hesy
stem andhencei
tresul
tsi
na
dupl
i
cat
eout
put
.
3)Annoy
ing(
Ir
ri
tat
ing)
• Sy
stemsbehav
iori
sdehumani
zi
ng f
ore.
g.namesar
etr
uncat
ed(
shor
ten,cut
shor
t)/
modi
fi
edar
bit
rar
il
y(Random choi
ce)
.
• Becauseoft
hepr
esenceofbugsi
nthesy
stem t
heper
for
manceoft
hesy
stem
degr
ades.
• Forexampl
e:Thenamesar
eshor
tenedorchanged.
4)Di
stur
bing
• Itr
efusest
ohandl
eLegi
ti
mat
e(l
egal
/aut
hor
ized)t
ransact
ions.
• Fore.
g.ATM machi
ner
efusest
opr
ocesst
hewi
thdr
awal
transact
ion.
5)Ser
ious
• Thei
nfor
mat
ionaboutt
het
ransact
ionget
slostsuchas
• Losi
ngt
rackoft
ransact
ions&t
ransact
ionev
ent
s.
• Account
abi
l
ity
(responsi
bil
i
ty)i
slost
.
• Tr
ansact
ionoccur
rence.
• Whensuchi
nfor
mat
ioni
slostt
her
esul
ti
ngbugi
scal
l
edaser
iousbug.
6)Ver
yser
ious
• Sy
stem doesanot
hert
ransact
ioni
nst
eadofr
equest
ed
• Fore.
g.Deposi
ttr
ansact
ioni
sconv
ert
edi
ntowi
thdr
awal
transact
ion
7)Ext
reme
• Theconsequenceoccur
sfr
equent
lyandi
snotl
i
mit
edt
osmal
lnumberofuser
sor
t
ransact
ions.
8)I
ntol
erabl
e
• Longt
erm,
unr
ecov
erabl
ecor
rupt
ionoft
heDat
abase(
noteasi
l
ydi
scov
eredand
mayl
eadt
osy
stem down)
.
9)Cat
ast
rophi
c
• Sy
stem f
ail
sandshut
sdown.
10)I
nfect
ious
• Cor
rupt
sot
hersy
stems,
evenwheni
tmaynotf
ail
.
3.
3.Fl
exi
bleSev
eri
tyRat
herThanAbsol
utes
Manypr
ogr
ammer
s,t
est
ers,andqual
i
tyassur
ancewor
ker
shav
eanabsol
uti
stat
ti
tude
t
owar
dsbugs.“
Ever
ybodyknowst
hatapr am mustbeper
ogr fecti
fit
’st
owor
k:i
fther
e’sabug,
tmustbef
i ixed.
”
Metr
ics:
Cor
recti
onCost
Thecostofcor
rect
ingabughasal
mostnot
hingt
odowi
thsy
mpt
om sev
eri
ty.
Cat
ast
rophi
c,l
i
fe-
thr
eat
eni
ngbugscoul
dbei
gnor
abl
etof
ix,
wher
easmi
norannoy
ances
coul
drequi
remaj
orr
ewr
it
est
ocor
rect
.
Cont
extandAppl
i
cat
ionDependency
Sev
eri
tydependsont
hecont
extandt
heappl
i
cat
ioni
nwhi
chi
tisused.
Cr
eat
ingCul
tur
eDependency
Sev
eri
tydependsont
hecr
eat
orsoft
hesof
twar
eandt
hei
rcul
tur
alaspi
rat
ions.
UserCul
tur
eDependency
Sev
eri
tydependsonusercul
tur
e
Naï
veuser
sofsof
twar
egocr
azyov
erbugswher
easexper
tsmayj
usti
gnor
e..
TheSof
twar
eDev
elopmentPhase
Sev
eri
tydependsondev
elopmentphase.
Anybugget
smor
esev
ereasi
tget
scl
osert
ofi
elduseandmor
esev
eret
hel
ongeri
thas
beenar
ound.
3.
4.TheNi
ght
mar
eLi
standWhent
oSt
opTest
ing
1.Li
stal
lni
ght
mar
esi
nter
msoft
hesy
mpt
oms&r
eact
ionsoft
heusert
othei
r
consequences.
2.Converttheconsequencesofeachni
ghtmareint
oacost.Ther
ecoul
dber
eworkcost
.
Orderthesefr
om thecostl
iestt
othecheapest
.Discar
dthosewit
hwhi
chy
oucanli
ve
with.
3.Basedonexperi
ence,
measureddat
a,i
nsi
ght,andpubli
shedst
atist
icsassumetheki
nd
ofbugscausi
ngeachsymptom.Thi
siscal
led‘bugdesi
gnprocess’
.Abugt ypecan
causemult
ipl
esymptoms.
4.Ordert
hecausat
ivebugsbydecr
easi
ngpr
obabi
l
ity
.Cal
cul
atet
hei
mpor
tanceofabug
t
ypeas:
I
mpor
tanceofbugt
ype j
= ∑CjkPjk wher
e,al
lk
Cjk=costduet
obugt
ypej
causi
ngni
ght
mar
ek
Pjk=pr
obabi
l
ityofbugt
ypej
causi
ngni
ght
mar
ek
Costduet
oal
lbugt
ypes= ∑∑Cjk Pjk
5.Rankt
hebugt
ypesi
nor
derofdecr
easi
ngi
mpor
tance.
6.Desi
gntests&designQAinspect
ionpr
ocessbyusi
ngmostef
fect
ivemet
hodsagai
nst
themostimpor
tantbugs.
7.I
fat estispassedorwhencorr
ect
ioni
sdonef
orafai
ledt
est
,someni
ghtmares
disappear.Astest
ingpr
ogr
esses,
revi
set
hepr
obabi
li
ti
es&ni
ghtmar
esli
staswell
as
theteststrat
egy.
8.St
opt
est
ingwhenpr
obabi
l
ity(
impor
tance&cost
)pr
ovest
obei
nconsequent
ial
.
4.TAXONOMYOFBUGS(
Classi
fi
cat
ion)
Ther
eisnouni
ver
sal
l
ycor
rectwayt
ocat
egor
izebugs.Thi
staxonomyi
snotr
igi
d.Bugsar
e
di
ff
icul
ttocat
egor
ize.Agi
venbugcanbeputi
ntooneoranot
hercat
egor
ydependi
ngoni
ts
hi
stor
yandt
hepr
ogr
ammer
’sst
ateofmi
nd.
6mai
ncat
egor
ieswi
thsub-
cat
egor
ies.(
Sampl
ebugst
ati
sti
cs)
Requi
rement
s,Feat
ures,
Funct
ional
i
tyBugs 24.
3%bugs
St
ruct
ural
Bugs 25.
2%
Dat
aBugs 22.
4%
Codi
ngBugs 9.
9%
I
nter
face,
Int
egr
ati
onandSy
stem Bugs 10.
7%
Test
ing&TestDesi
gnBugs 2.
8%
4.
1.Requi
rement
s,Feat
ures,
Funct
ional
i
tyBugs
Requi
rement
s&Speci
fi
cat
ions:
Requi
rement
sar
eexpr
essedi
nthef
orm ofspeci
fi
cat
ions.
Speci
fi
cat
ionsgi
vedet
ail
eddescr
ipt
ionaboutt
her
equi
rement
soft
hesof
twar
e.
I
fspeci
fi
cat
ionsar
enotcl
ear
lydef
inedwemaygetbugs.
I
ncompl
eteness,
ambi
guous(
conf
usi
on)bugsoccuri
nthi
sphase.
Anal
yst
’sassumpt
ionsnotknownt
othedesi
gner
Thesear
eexpensi
ve:i
ntr
oducedear
lyi
nSDLCandr
emov
edatt
hel
ast
Feat
ureBugs:
Thedi
ff
icul
ti
est
hatar
isei
nfeat
urebugsar
edue t
ospeci
fi
cat
ionpr
obl
ems
Af
eat
urecanbeei
theri
ncor
rectormi
ssi
ngf
eat
ure.
AMi
ssi
ngf
eat
urecanbedet
ect
ed&cor
rect
edeasi
l
y.
Remov
ingf
eat
uresmaycompl
i
cat
esof
twar
eandcausemor
ebugs.
Funct
ional
i
tyBugs
Thef
eat
urest
hatar
esi
mil
arar
ecombi
nedt
ofor
m gr
oups.
Thor
ought
est
ingi
sper
for
medbet
weent
hef
eat
uresofgr
oupandbet
weent
he
i
nter
act
ionoff
eat
ures.
Thedi
ff
icul
tyar
iseswhent
her
eisanunexpect
edi
nter
act
ionbet
weent
hef
eat
ures.
Remedi
esTest
ingTechni
ques:
Funct
ional
testt
echni
ques-t
ransact
ionf
lowt
est
ing,
synt
axt
est
ing,
domai
n
t
est
ing,
logi
ctest
ing,
andst
atet
est
ingcanel
i
minat
erequi
rement
s&speci
fi
cat
ions
bugs.
4.
2.St
ruct
ural
Bugs
I
nthi
s,wehav
e5t
ypesofst
ruct
ural
bugs,
thei
rcausesandr
emedi
es.
1)Cont
rol
&Sequencebugs
2)Logi
cBugs
3)Pr
ocessi
ngbugs
4)I
nit
ial
i
zat
ionbugs
5)Dat
afl
owbugs
1)Cont
rol
&SequenceBugs
Cont
rol
andsequencebugsoccur
sduet
omi
ssi
ngpr
ocessst
eps,
pat
hsl
eftout
unr
eachabl
ecode
I
mpr
opernest
ingofl
oops,
Incor
rectl
oop-
ter
minat
ionMi
ssi
ngpr
ocessst
eps,
dupl
i
cat
edorunnecessar
ypr
ocessi
ng,
viol
entGOTOs.
UsageofOl
dcode(
assembl
ylanguage&COBOL)
.
(
Remedi
es)
Det
ect
edbyUni
t,st
ruct
ural
,pat
h,&f
unct
ional
test
ing.
2)Logi
cBugs
Logi
cbugsshowt
hebehav
ioroft
hest
atement
s&oper
ati
ons.
Logi
cbugsi
ncl
udei
ncor
rectdesi
gnoft
estcases,
incor
rectexpl
anat
ionand
combi
nat
ionofcases,
compl
i
cat
edoper
ator
s.
Mi
sunder
standi
ngoft
hesemant
icsoft
hecont
rol
str
uct
ures&l
ogi
coper
ator
s.
I
mpr
operl
ayoutofcases(
incl
udi
ngi
mpossi
blecases&i
gnor
ingnecessar
ycases)
.
Deepl
ynest
edcondi
ti
onal
stat
ement
s&usi
ngmanyl
ogi
cal
oper
ati
onsi
n1st
mt.
Pr
event
ionandCont
rol
(Remedi
es)
Logi
ctest
ing,
car
eful
checks,
funct
ional
test
ing
3)Pr
ocessi
ngBugs
Ar
it
hmet
ic,
algebr
aic,
mat
hemat
ical
funct
ionev
aluat
ion
Thesebugsoccuri
fwr
ongdat
aconv
ersi
onmet
hodsar
eusedf
orconv
ert
ingdat
a
f
rom onef
ormatt
oanot
her
.
I
mpr
operuseofr
elat
ional
oper
ator
s.
Pr
event
ionandCont
rol
(Remedi
es)
Thesef
requentbugsar
ecaughti
nUni
tTest
ing&hav
eonl
ylocal
i
zedef
fect
.
Domai
ntest
ingmet
hods
4)I
nit
ial
i
zat
ionBugs
I
nit
ial
i
zat
ionbugsconsi
stsofwr
ongdat
aty
pes&wr
ongi
nit
ial
val
ues,
wrongr
egi
ster
s
et
c.
I
nit
ial
i
zat
ionbugsar
edet
ect
edbybot
hexper
iencedpr
ogr
ammer
s&t
est
ers.
I
nit
ial
i
zet
owr
ongdat
aty
peorf
ormat
.
Thesear
ever
ycommon.
Pr
event
ionandCont
rol
:
Pr
ogr
ammi
ngt
ool
s,expl
i
citdecl
arat
ion&t
ypechecki
ngi
nsour
cel
anguage,
pr
epr
ocessor
s.
Dat
afl
owt
estmet
hodshel
pdesi
gnoft
est
sanddebuggi
ng.
5)Dat
afl
owBugs&Anomal
i
es
Dat
afl
owanomal
i
esar
isewhenadat
aisat
tempt
edt
obeusedf
oranunnecessar
y
pur
posesuchasusi
nganuni
nit
ial
i
zedv
ari
abl
e,i
nit
ial
i
zingav
ari
abl
etwi
ce.
Re-
ini
ti
ali
zat
ionwi
thoutani
nter
medi
ateuse.
Thedat
afl
owanomal
ydet
ect
ioncanbedet
ect
edbyacompi
l
erdur
ing
Compi
l
eti
meandexecut
iont
ime.
Pr
event
ionandCont
rol
:
Dat
afl
owt
est
ingmet
hods
4.
3.Dat
aBugs
Dependont
het
ypesofdat
aort
her
epr
esent
ati
onofdat
a.Ther
ear
e4subcat
egor
ies.
1)Gener
alDat
aBugs
2)Dy
nami
cDat
aVsSt
ati
cDat
a
3)I
nfor
mat
ion,
Par
amet
er,
andCont
rol
Bugs
4)Cont
ent
s,St
ruct
ure&At
tri
but
esr
elat
edBugs
1)Gener
alDat
aBugs:
Duet
odat
aobj
ectspecs.
,for
mat
s,numberofobj
ect
s&t
hei
rini
ti
alv
alues.
Commonasmuchasi
ncode,
especi
all
yast
hecodemi
grat
est
odat
a.
2)Dy
nami
cDat
aVsSt
ati
cDat
a:
Dy
nami
cDat
a:
Dy
nami
cdat
aar
etr
ansi
tor
y(t
empor
ary
).
What
evert
hei
rpur
poset
hei
rli
fet
imei
srel
ati
vel
yshor
t(t
hepr
ocessi
ngt
imeofa
t
ransact
ion)
.
Ast
orageobj
ectmaybeusedt
ohol
ddy
nami
cdat
aofdi
ff
erentt
ypes,
wit
hdi
ff
erent
f
ormat
sandat
tri
but
es.
Dy
nami
cdat
abugsar
eduet
olef
tov
ergar
bagei
nashar
edr
esour
ce.
Thi
scanbehandl
edi
noneoft
het
hreeway
s:
(
1)Cl
eanupaf
tert
heusebyt
heuser
(
2)CommonCl
eanupbyt
her
esour
cemanager
(
3)NoCl
eanup(
thi
sisusual
l
ywedo)
.
St
ati
cDat
a:
St
ati
cDat
aar
efi
xedi
nfor
m andcont
ent
.
Theyappeari
nthesour
cecodeordat
abasedi
rect
lyori
ndi
rect
ly.
Compi
l
eti
mepr
ocessi
ngwi
l
lsol
vet
hebugscausedbyst
ati
cdat
a.
3)I
nfor
mat
ion,
par
amet
er,
andcont
rol
:
St
ati
cordy
nami
cdat
acanser
vei
noneoft
hreer
oles,ori
ncombi
nat
ionof
r
oles:
asapar
amet
er,
forcont
rol
,orf
ori
nfor
mat
ion.
I
nfor
mat
ion:dy
nami
c,l
ocal
toasi
ngl
etr
ansact
ionort
ask.
Par
amet
er:par
amet
erspassedt
oacal
l
.
Cont
rol
:dat
ausedi
nacont
rol
str
uct
uref
oradeci
sion.
Bugs:
Usual
l
ysi
mpl
ebugsandeasyt
ocat
ch.
4)Cont
ent
s,St
ruct
ure&At
tri
but
esr
elat
edBugs:
Dat
aspeci
fi
cat
ionsconsi
stoft
hreepar
ts.
Cont
ent
s:ar
epur
ebi
tpat
ter
ns.
St
ruct
ure:
Size,
shape&al
i
gnmentofdat
aobj
ecti
nmemor
y.Ast
ruct
uremayhav
e
subst
ruct
ures.
At
tri
but
es:
Semant
icsassoci
atedwi
tht
hecont
ent
sofdat
aobj
ect(
e.g.i
nteger
,st
ri
ngand
subr
out
ine)
.
Bugs:
Cont
entbugsar
eduet
omi
sint
erpr
etat
ionorcor
rupt
ionofi
t.
St
ruct
ural
bugsmaybeduet
owr
ongdecl
arat
ion
At
tri
but
ebugsar
eduet
omi
sint
erpr
etat
ionofdat
aty
pe,
probabl
yatani
nter
face
4.
4.Codi
ngBugs
Codi
nger
ror
sofal
lki
ndscancr
eat
eanyoft
heot
herki
ndofbugs.
Sy
ntaxer
ror
sar
egener
all
ynoti
mpor
tanti
ntheschemeoft
hingsi
fthesour
ce
l
anguaget
ransl
atorhasadequat
esy
ntaxchecki
ng.
I
fapr
ogr
am hasmanysy
ntaxer
ror
s,t
henweshoul
dexpectmanyl
ogi
candcodi
ng
bugs.
The document
ati
on bugsar
e al
so consi
der
ed ascodi
ng bugswhi
ch may
mi
sleadt
hemai
ntenancepr
ogr
ammer
s.
4.
5.I
nter
face,
Int
egr
ati
onandSy
stemsBugs:
Ther
ear
e9t
ypesofbugsoft
hist
ype.
1)Ext
ernal
Int
erf
aces
2)I
nter
nal
Int
erf
aces
3)Har
dwar
eAr
chi
tect
ureBugs
4)Oper
ati
ngSy
stem Bugs
5)Sof
twar
ear
chi
tect
urebugs
6)Cont
rol
&Sequencebugs
7)Resour
cemanagementbugs
8)I
ntegr
ati
onbugs
9)Sy
stem bugs
1)Ext
ernal
Int
erf
aces:
Theext
ernal
int
erf
acesar
ethemeansusedt
ocommuni
cat
ewi
tht
hewor
ld.
Thesei
ncl
udedev
ices,
sensor
s,i
nputt
ermi
nal
s,pr
int
ers,
andcommuni
cat
ionl
i
nes.
Ot
herext
ernali
nter
facebugsar
e:i
nval
i
dti
mingorsequenceassumpt
ionsr
elat
edt
o
ext
ernal
signal
s
Mi
sunder
standi
ngext
ernal
inputorout
putf
ormat
s.
I
nsuf
fi
cientt
oler
ancet
obadi
nputdat
a.
2)I
nter
nal
Int
erf
aces:
I
nter
nali
nter
faces ar
e notdi
ff
erentf
rom ext
ernali
nter
faces butt
heyar
e mor
e
cont
rol
l
ed.
Abestexampl
efori
nter
nal
int
erf
acesi
scommuni
cat
ingr
out
ines.
Theext
ernalenv
ironmenti
sfi
xed and sy
stem mustadaptt
oitbutt
hei
nter
nal
env
ironment
,whi
chconsi
stsofi
nter
faceswi
thot
hercomponent
s,canbenegot
iat
ed
(
mut
ual
agr
eed)
I
nter
nal
int
erf
aceshav
ethesamepr
obl
em asext
ernal
int
erf
aces.
3)Har
dwar
eAr
chi
tect
ure:
Bugsr
elat
edt
ohar
dwar
ear
chi
tect
ureor
igi
nat
emost
lyf
rom mi
sunder
standi
nghow
t
hehar
dwar
ewor
ks.
Exampl
es ofhar
dwar
e ar
chi
tect
ure bugs:addr
ess gener
ati
on er
ror
,i/
o dev
ice
oper
ati
on /i
nst
ruct
ion er
ror
,wai
ti
ng t
oo l
ong f
orar
esponse,i
ncor
recti
nter
rupt
handl
i
nget
c.
Ther
emedyf
orhar
dwar
ear
chi
tect
ureandi
nter
facepr
obl
emsi
s
(
1)GoodPr
ogr
ammi
ngandTest
ing
(
2)Cent
ral
i
zat
ionofhar
dwar
eint
erf
acesof
twar
einpr
ogr
amswr
it
tenbyhar
dwar
e
i
nter
facespeci
ali
sts.
4)Oper
ati
ngSy
stem Bugs:
Pr
ogr
am bugs r
elat
ed t
othe oper
ati
ng sy
stem ar
e a combi
nat
ion ofhar
dwar
e
ar
chi
tect
ureandi
nter
facebugsmost
lycausedbyami
sunder
standi
ngofwhati
tist
he
oper
ati
ngsy
stem does.
Useoper
ati
ngsy
stem i
nter
facespeci
ali
sts,anduseexpl
i
citi
nter
facemodul
es f
oral
l
oper
ati
ngsy
stem cal
l
s.
5)Sof
twar
eAr
chi
tect
ure:
Sof
twar
ear
chi
tect
urebugsar
etheki
ndt
hatcal
l
ed-i
nter
act
ive.
Rout
inescanpassuni
tandi
ntegr
ati
ont
est
ingwi
thoutr
eveal
i
ngsuchbugs.
.
Car
efuli
ntegr
ati
onofmodul
esandsubj
ect
ingt
hef
inalsy
stem t
otestar
eef
fect
ive
met
hodsf
ort
hesebugs.
6)Cont
rol
andSequenceBugs(
Syst
emsLev
el)
:
These bugs i
ncl
ude:I
gnor
ed t
imi
ng,Assumi
ng t
hatev
ent
s occuri
n a speci
fi
ed
sequence,Wor
kingondat
abef
oreal
lthedat
ahav
ear
ri
vedf
rom di
sc,Wai
ti
ngf
oran
i
mpossi
blecombi
nat
ionofpr
erequi
sit
es,Mi
ssi
ng,wr
ong,r
edundantorsuper
fl
uous
pr
ocessst
eps.
Ther
emedyf
ort
hesebugsi
shi
ghl
yst
ruct
uredsequencecont
rol
.
7)Resour
ceManagementPr
obl
ems:
Memor
yissubdi
vi
dedi
ntody
nami
cal
l
yal
l
ocat
edr
esour
cessuchasbuf
ferbl
ocks,
queue bl
ocks,
taskcont
rol
blocks,
andov
erl
aybuf
fer
s.
Somer
esour
cemanagementandusagebugs:Requi
redr
esour
cenotobt
ained,
Wrong
r
esour
ceused,
Resour
cei
sal
readyi
nuse,
Resour
cedeadl
ocket
c.
8)I
ntegr
ati
onBugs:
I
ntegr
ati
on bugsar
e bugshav
ing t
o do wi
tht
he i
ntegr
ati
on of
,and wi
tht
he
i
nter
facesbet
ween,
wor
kingandt
est
edcomponent
s.
Thesebugsr
esul
tsf
rom i
nconsi
stenci
esori
ncompat
ibi
l
iti
esbet
weencomponent
s.
9)Sy
stem Bugs:
Sy
stem bugscov
ersal
lki
ndsofbugssuchaspr
ogr
ams,dat
a,har
dwar
e,andt
he
oper
ati
ngsy
stems.
Ther
e can be no meani
ngf
ulsy
stem t
est
ing unt
ilt
her
e has been t
hor
ough
componentandi
ntegr
ati
ont
est
ing.
4.
6.TestandTestDesi
gnBugs
Test
ing:
Test
ershav
enoi
mmuni
tyt
obugs.
Test
srequi
recodet
hatusescompl
i
cat
edscenar
ios&dat
abases,
tobeexecut
ed.
Bugsi
nTest
ing(
scr
ipt
sorpr
ocess)ar
enotsof
twar
ebugs.
I
t’
sdi
ff
icul
t&t
akest
imet
oident
if
yifabugi
sfr
om t
hesof
twar
eorf
rom t
het
est
scr
ipt
/pr
ocedur
e.
TestCr
it
eri
a:(
TestDesi
gn)
Test
ingpr
ocessi
scor
rect
,butt
hecr
it
eri
onf
orj
udgi
ngsof
twar
e’sr
esponset
otest
s
i
sincor
rectori
mpossi
ble.So,
apr
opert
estcr
it
eri
onhast
obedesi
gned.
Themor
ecompl
i
cat
edt
hecr
it
eri
a,t
hel
i
kel
i
ert
heyar
etohav
ebugs.
Remedi
es:
TestDebuggi
ng:
Thef
ir
str
emedyf
ort
estbugsi
stest
inganddebuggi
ngt
het
est
s.Test
debuggi
ng,whencompar
edt
o pr
ogr
am debuggi
ng,i
seasi
erbecauset
est
s,when
pr
oper
lydesi
gnedar
esi
mpl
ert
hanpr
ogr
amsanddon’
thav
etomakeconcessi
onst
o
ef
fi
ciency
.
TestQual
i
tyAssur
ance:
Progr
ammer
shav
ether
ightt
oaskhowqual
i
tyi
nindependent
t
est
ingi
smoni
tor
ed.
TestExecut
ionAut
omat
ion:
Assembl
ers,l
oader
s,compi
l
ersar
edev
elopedt
oreduce
t
hei
nci
denceofpr
ogr
ammi
ngandoper
ati
oner
ror
s.Testexecut
ionbugsar
evi
rt
ual
l
y
el
i
minat
edbyv
ari
oust
estexecut
ionaut
omat
iont
ool
s.
TestDesi
gnAut
omat
ion:
Justasmuchofsof
twar
edev
elopmenthasbeenaut
omat
ed,
mucht
estdesi
gncanbeandhasbeenaut
omat
ed.
Ov
erv
iew:
Att
heendofal
ongst
udyont
axonomy
,wecoul
dsay
Gooddesi
gncont
rol
sbugsandi
seasyt
otest
.
Thet
wof
act
ors(
GoodandBaddesi
gn)r
esul
tsi
nhi
ghpr
oduct
ivi
tydi
ff
erences.
Goodt
estwor
ksbestongoodcodeandgooddesi
gn.
Goodt
estcannotdoamagi
conbadl
ydesi
gnedsof
twar
e.
Bi
ggestpar
tofsof
twar
ecosti
sthecostofbugs:t
hecostofdet
ect
ingt
hem,t
hecost
ofcor
rect
ingt
hem,t
hecostofdesi
gni
ngt
est
sthatdi
scov
ert
hem,andt
hecostof
r
unni
ngt
est
s.
Thet
estt
echni
quesy
ouusemustbemat
chedt
otheki
ndofbugsy
ouhav
e.
5.I
MPLEMENTATI
ON&APPLI
CATI
ONOFPATHTESTI
NG
5.
1.I
ntegr
ati
on,
Cov
erage,
andPat
hsi
nCal
l
edComponent
s:
• Mai
nlyusedi
nUni
ttest
ing,
especi
all
ynewsof
twar
e.
• I
nanI
deal
i
sti
cbot
tom-
upi
ntegr
ati
ont
estpr
ocess–i
ntegr
ati
ngonecomponentata
t
ime.Usest
ubsf
orl
owerl
evel
component(
sub-
rout
ines)
,testi
nter
facesandt
hen
r
epl
acest
ubsbyr
eal
subr
out
ines.
• I
nreal
i
ty,
int
egr
ati
onpr
oceedsi
nassoci
atedbl
ocksofcomponent
s.St
ubsmaybe
av
oided.Needt
othi
nkaboutpat
hsi
nsi
det
hesubr
out
ine.
Toachi
eveC1orC2cov
erage:
Sensi
ti
zat
ionbecomesmor
edi
ff
icul
t.
Sel
ect
edpat
hmaybeunachi
evabl
east
hecal
l
edcomponent
s’pr
ocessi
ngmay
bl
ocki
t.
WeaknessesofPat
htest
ing:
• I
tassumest
hatef
fect
ivet
est
ingcanbedoneonel
evel
atat
imewi
thoutbot
her
ingwhat
happensatl
owerl
evel
s.
• Pr
edi
cat
ecov
eragepr
obl
ems&bl
i
ndi
ng.
5.
2.Appl
i
cat
ions:
1)Appl
i
cat
ionofpat
htest
ingt
oNewCode:
1.
DoPat
hTest
sforC1+C2cov
erage.
2.
Apat
hbl
ockedornotachi
evabl
ecoul
dmeanabug.
3.
Whenabugoccur
sthepat
hmaybebl
ocked.
2)Appl
i
cat
ionofpat
htest
ingt
oMai
ntenance:
1)Pat
htest
ingi
sappl
i
edf
ir
stt
othemodi
fi
edcomponent
.
2)Sel
ectpat
hst
oachi
eveC2ov
ert
hechangedcode.
3)Newerandmor
eef
fect
ivest
rat
egi
escoul
demer
get
opr
ovi
decov
eragei
nmai
ntenance
phase.
3)Appl
i
cat
ionofpat
htest
ingt
oRehost
ing:
1)Pat
htest
ingwi
thC1+C2cov
eragei
sapower
ful
tool
forr
ehost
ingol
dsof
twar
e.
2)Sof
twar
eisr
ehost
edasi
t’
snomor
ecostef
fect
ivet
osuppor
ttheappl
i
cat
ion
env
ironment
.
Pr
ocessofpat
htest
ingdur
ingRehost
ing
• At
ransl
atorf
rom t
heol
dtot
henewenv
ironmenti
scr
eat
ed&t
est
ed.Rehost
ing
pr
ocessi
stocat
chbugsi
nthet
ransl
atorsof
twar
e.
• Acompl
eteC1+C2cov
eragepat
htestsui
tei
scr
eat
edf
ort
heol
dsof
twar
e.
Test
sar
eruni
ntheol
denv
ironment
.Theout
comesbecomet
hespeci
fi
cat
ions
f
ort
her
ehost
edsof
twar
e.
• Anot
hert
ransl
atormaybeneededt
oadaptt
het
est
s&out
comest
othenew
env
ironment
.
• Thecostoft
hepr
ocessi
shi
gh,
buti
tav
oidsr
isksassoci
atedwi
thr
ewr
it
ingt
he
code.
• Oncei
trunsonnewenv
ironment
,itcanbeopt
imi
zedorenhancedf
ornew
f
unct
ional
i
ties(
whi
chwer
enotpossi
blei
ntheol
denv
ironment
).