You are on page 1of 15

A.

M.JAI
NCOLLEGE(
SHI
FT-
II
)
(
Depar
tmentofComput
erAppl
i
cat
ion)
SOFTWARETESTI
NG(
SAZ6C)
Pr
evi
ousYearQuest
ions(
Uni
ver
sit
y)andAnswer
s

UNI
T-I
II
PART–A:
-
1.Defi
neTr
ansact
ion. (
Jul
y
2014)
A t r
ansaction 
is a unit of work seen fr
om a sy st
em user
's poi
nt of v
iew.

transacti
on consi
stsofasequenceofoperati
ons,someofwhi
chareperf
ormedbya
sy
stem, personsordevi
cesthatar
eout
sideoft
hesy st
em.

2.Ment
iont
het
ypesofi
ntegr
ati
ont
est
ing.
Some di
ff
erenttypesofi nt
egrat
iontest
ing 
arebig-bang,mi
xed(sandwich)
,ri
sky-har
dest
,
top-
down,andbot t
om- up..
..I
nthebig-
bangapproach,mostofthedevel
opedmodul esare
coupl
edtogethertoform acomplet
esoftwaresy
st em ormaj
orpartoft
hesystem andthen
usedfor
 i
ntegrat
iontesti
ng.

3.Whatdoy
oumeanbypat
h?

Patht est
ing i
sast ructur
al 
test
ing 
methodthati
nv ol
vesusingthesourcecodeofa
program inordertofindeverypossibl
eexecut
abl
e path.I
thelpst
odetermineal
lfaul
ts
l
ying wi thi
n a pi ece of code. This method i s desi
gned to execute al
l or
selected 
path 
thr
oughacomput erpr
ogram.

4.Whatar
etheadv
ant
agesofgl
assboxt
est
ing?

Someoft he 
advantages 
ofgl
assbox(white-
box)testi
ng ar
e:Eff
ici
enti
nfindi
nger r
ors
andpr obl
ems.Requi r
edknowledgeofint
ernal
soft hesoftwar
eunder t
est
 isbenefi
cial
forthorough 
test
ing...
.Duetorequi
redinter
nalknowledgeofthesoftwar
e,maxi mum
coverageisobtai
ned.

5.Whati
stheuseofdat
afl
owt
est
ing?

Dat
af low testi
ngi safamilyofteststrat
egiesbasedonsel ecti
ng 
pat hs 
thr
oughthe
pr
ogram'scont rolfl
ow i
nor dertoexploresequencesofev ent
sr el
atedt othestat
us
of
 var
iabl
es or dat a objects. Dataf
low Test i
ng f ocuses on t he poi nt
s at
whi
chv ar
iables 
recei
veval
uesandt hepoint
satwhichthesev al
uesareused.

6.Def
ine:
Simpl
ePat
hSegment
.
Anypathinwhichthesamenodei svi
sit
edtwi
ceatthemost ,suchapathi
scal l
eda
simplepathsegment.
 Onecaneasilymakeoutwhyasi mplepathsegmentiscal
ledso! -I
t
i
scal l
edsobecausei tdoesnotconsi
stsofloopsi
nbotht henodes.Onlyonenodehol ds
theloop.
 Oneoft heprobl
emsthatarefacedbythetest
ersisoffi
ndingthesi
mpl epaths.
 
Thi
sprobl
em canbeover
comebyfol
l
owingalowerboundmax-fl
owapproach.
 Thesi
mpl e
pat
hsegmentsthoughbei
ng,ar
eimpor
tanti
nthedataflow t
est
ingj
ustli
kealltheother
pat
hsegments
7.Whatdoy
oumeanbydomai
nspan?
Nice 
domain boundari
esarecompl et
einthatt
hey 
span t
henumberspacef r
om plusto
minusinfi
nit
yi nalldi
mensions.someincompl
eteboundari
es.Boundari
esAandEhav e
gaps.Suchboundar i
escancomeaboutbecausethepaththathypothet
ical
l
ycorr
esponds
tothem i
sunachievable.
(
Jul
y2012)

8.Compar
ethecont
rastt
est
inganddebuggi
ng.

Debuggi
ng purposeistofi
ndcauseofbug.Thi sisal lIknowabout  
Diff
erencebetween
Testi
ng 
and Debugging,butthe bi
g di
fference 
ist hat debuggi
ng i
s conducted by a
progr
ammerandt heprogr
ammersfixtheer ror
sduring debuggingphase.Tester
snever
fi
xtheerr
ors,butrat
herfi
nedt
hem andr eturntoprogr ammer .
9.Def
ineLoopi
nsof
twar
etest
ing.
Loop Testing 
i
st he vari
antof test
ing 
thatcomplet
elyfocuses on t he val
idi
ty of
the 
loop 
constr
ucts.I
tisoneoft hepartofContr
olStr
uctur
e Test
ing (
path 
testi
ng,data
vali
dati
on 
testi
ng,condit
ion 
test
ing)...
.Thistechni
que is used to 
testloops i
nt he
program.
10.
Whatdoy
oumeanbydomai
ncl
osur
es?

Asmallf
erromagnet
ic domai
n whoseposit
ionandori
entat
ionensuret
hatthefl
uxlines
bet
ween adjacentl
arger 
domains 
closeon themsel
ves.Also known asfl
ux-
closure
domai
n.
(
Nov2013)
11.
Whent
est
ingi
ssai
dtobecompl
ete?
Therearesomepoi ntswhichi
ndicat
ethat
 t
esti
ng 
i
s compl
ete.Theexitcr
it
eri
at hatwas
mentioned in t he 
test
 pl
an document is achi
eved. when we achei v
ed no. of
successful
 
test 
caseexecuti
onataspeci
fi
edlev
el.whenrat
eofbugfindi
ngdecreasefr
om
aspecifi
edlevel
.
12.Nameanyf
oursof
twar
etest
ingt
ool
s.

 Testmanagementtool
s
 Requir
ementsmanagementtool
s
 I
ncidentmanagementt
ools
 Confi
gurat
ionmanagementtool
s

13.Def
ineDomai
n.
A domai
n namei sy
ourwebsitename.A domai n 
namei stheaddr
esswhereInt
ernetuser
s
canaccessy ourwebsi
te..
..Becauseofthis,
 domain 
nameswer edev
elopedandusedt o
i
denti
fyenti
ti
esontheInter
netrat
herthanusingIPaddresses.
14.
Howdat
afl
owi
smeasur
ed?

Abst r
act:The purpose ofthe resear
ch isto devel
op formul
ati
ons t o measure t
he
testabil
it
yofapr ogram...
.Aprogram withahi
ghdegr eeoftest
abil
it
yi ndicat
est hata
selected 
test
ing 
cri
teri
oncouldbeachievedwit
hl esseff
ortandtheexistingfault
scan
ber eveal
edmor eeasil
yduri
ng t
esti
ng.
15.Whati
spur
poseofl
i
nkmar
ker
?
Thebugassumpt i
onfort
hepath 
test
ing 
strategi
esisthatsomethi
nghasgonewrongwith
the 
soft
ware t
hat makes ittake a different pat
ht han int
ended...
.Inl i
nked l
ist
repr
esentat
ion,eachnodehasanameandt hereisanentryontheli
stf
oreach 
l
ink 
int
he
fl
owgraph. 
(
Nov2015)
16.Whatdoy
oumeanbydomai
nspan?
Wheny ou'
re 
doingdomai n 
test
ingthen you 
checkextr
emev al
uesofani nputvar
iabl
e.All
i
nputstoa. .
.Simil
arl
y, 
we coul
d defi
ne aspheri
cal
 domain 
wit
honeboundar ybutinthr
ee
var
iabl
es....
.Nice 
domai n 
boundari
es are 
complet
ei nthatthey
 span 
thenumberspace
f
rom pl
ustomi nusinf
ini
tyinalldi
mensions.

17.Whati
sdy
nami
csl
i
cing?
In comput erprogrammi ng,progr
am sl
ici
ng i
st he computat
ion ofthe setofpr ogr
am
statements,theprogram sli
ce,t
hatmayaffectt
hev al
uesatsomepoi ntofi
nter
est,r
efer
red
toasa sli
cing cr
it
erion.Progr
am sl
ici
ngcan beusedindebuggi
ngtolocatesourceoferr
ors
mor eeasi
ly .
18.
Def
ine:
loopf
reepat
hsegment
.
The l
oopfreepathsegments 
form aver
yimpor t
antterminol
ogyinthepathofdatafl
ow
test
ing.Butmany of us are notwellfamili
ar wit
ht he conceptof l
oop fr
ee path
segments 
andtherol
ethatt
heyhavegottoplayinthedatafl
owtesti
ngorpatht
esti
ng.
PART–B:
-
(
JULY2014)
1.Howt
odesi
gnapr
oduct
?Di
scuss.
Requi
rement
sAnal
ysi
s
o Extr
acti
ngtherequirementsofadesir
edsoft
wareproducti
sthefir
stt
askincreati
ng
i
t.Whilecustomersprobabl
ybelievetheyknowwhatthesoft
wareistodo, i
tmayrequi
reskil
land
exper
ience in soft
ware engineeri
ng tor ecogni
ze i
ncomplet
e,ambi guous orcontr
adictor
y
requi
rements.
Speci
fi
cat
ion
o Specif
icati
onist het askofpr eci
selydescr
ibi
ngt hesoftwar
et obewr it
ten,ina
mathemat i
callyr i
gorous way.I n pract
ice,most successf ulspecif
icat
ions are wr i
tten to
understandandf i
ne-t
uneapplicationsthatwereal r
eadywel l
-devel
oped,al
thoughsaf ety-cr
it
ical
soft
war esystemsar eoftencaref
ullyspecif
iedpri
ortoappl
icati
ondev el
opment .Speci
fi
cationsare
mosti mportantforexter
nali
nterfacesthatmustremainstable.
Sof
twar
ear
chi
tect
ure
o Thearchit
ectur
eofasoftwaresyst
em refer
st oanabstr
actr
epresent
ati
onofthat
system.Archit
ectur
ei s concer
ned wit
h making suret he sof
twar
e sy
stem willmeett he
requir
ement
soft heproduct,
aswell
asensuri
ngthatf
uturerequi
rement
scanbeaddressed.
I
mpl
ement
ati
on
o Reducingadesigntocodemaybethemostobv
iouspar
toft
hesof
twar
eengi
neer
ing
j
ob,
buti
tisnotnecessar
il
ythelar
gestpor
ti
on.
Test
ing
o Test
ingofpar
tsofsoft
ware,especi
all
ywher
ecodebyt
wodi
ff
erentengi
neer
smust
wor
ktoget
her
,fal
l
stothesoft
wareengi
neer.
Document
ati
on
o Animportantt
askisdocument
ingt
hei
nter
naldesi
gnofsof
twar
efort
hepur
poseof
f
utur
emai
ntenanceandenhancement.
Tr
aini
ngandSuppor
t
o Al ar
geper cent ageofsoftwareproj
ectsf ai
lbecausethedevelopersfai
ltorealize
thatitdoesn' tmat terhow mucht i
meandpl anni
ngadev el
opmentteam put sint
o creati
ng
soft
war eifnobodyi nanor ganizati
onendsupusingit.Peopleareoccasi
onal
lyresist
anttochange
andav oidv enturi
ngi ntoanunf amili
ararea,soasapar toft hedepl
oymentphase,i tsv ery
i
mpor tanttohav etrainingcl assesfort
hemostent husiast
icsoftwar
eusers(buil
dexcit
ementand
confi
dence),shifti
ngt hetrainingtowardstheneutralusersintermi
xedwiththeav i
dsuppor t
er s,
andfinall
yincorporatet her estoftheorgani
zati
onintoadoptingthenewsoftware.Userswil
lhav e
l
otsofquest ionsandsof twar eprobl
emswhi chl
eadst othenextphaseofsoftware.
Mai
ntenance
o Maintainingandenhanci ngsof twaretocopewi t
hnewl ydiscover
edproblemsornew
requi
rement
scant akef armor et i
met hant heiniti
aldevelopmentoft hesof t
ware.Notonlymayi t
benecessar
yt oaddcodet hatdoesnotf i
ttheor i
ginaldesignbutjustdet er
mininghowsof tware
worksatsomepoi ntaf teritiscompl etedmayr equiresignif
icanteffortbyasof t
wareengi neer
.
About60%ofallsoftwar eengi neeringwor kismai ntenance,butthi
sst ati
sti
ccanbemi sl
eadi
ng.A
smallpar
tofthati
sf ixingbugs.Mostmai ntenancei sextendi
ngsy stemst odonewt hings,which
i
nmanyway scanbeconsi derednewwor k.
2.Descri
beaboutPat hTest ing.

Whati
sPat
hTest
ing

Pathtest
ingisast r
ucturaltest
ingmethodt hatinvolv
esusingthesourcecodeofapr ogr
am in
ordert
ofindeverypossibleexecut
ablepath.Ithel
pst odet
ermineal
lfault
sly
ingwithi
napieceof
code.Thi
smet hodisdesignedtoexecuteallorselect
edpaththr
oughacomput erpr
ogram.

Anysoft
war eprogram incl
udes,mul
ti
pleentr
yandexi
tpoint
s.Testi
ngeachofthesepoi
ntsi
sa
chal
l
engingaswel last imeconsuming.Inordert
oreducetheredundantt
est
sandt oachi
eve
maximum testcoverage,basi
spatht
esti
ngisused.

Whati
sBasi
sPat
hTest
ing

Thebasispathtesti
ngissame,butitisbasedona Whit
eBoxTest i
ng 
method,t
hatdef
inestest
casesbasedont hefl
owsorlogicalpaththatcanbet akenthroughtheprogr
am.Basispat h
test
inginvol
vesexecuti
onofal lpossibl
eblocksinapr ogram andachievesmaximum pat h
coveragewit
hleastnumberoft
estcases.I
tisahybr
idofbranchtesti
ngandpatht
esti
ngmethods.

Theobject
ivebehi
ndbasispathtest
ingi
sthati
tdefi
nesthenumberofi
ndependentpat
hs,t
hus
thenumberoftestcasesneededcanbedefi
nedexpl
ici
tl
y(maxi
mizest
hecoverageofeachtest
case)
.

Her
ewewi
l
ltakeasi
mpl
eexampl
e,t
ogetbet
teri
deawhati
sbasi
spat
htest
ingi
ncl
ude

I
ntheaboveexampl
e,wecanseetherear
efewcondi
ti
onalst
atementsthati
sexecut
eddependi
ng
onwhatcondi
tioni
tsuf
fi
ce.Her
et her
eare3pathorcondit
ionthatneedtobetest
edtogetthe
out
put
,

 Pat
h1:
1,2,
3,
5,6,
7
 Pat
h2:
1,2,
4,
5,6,
7
 Pat
h3:
1,6,7

St
epsf
orBasi
sPat
htest
ing

Thebasi
cst
epsi
nvol
vedi
nbasi
spat
htest
ingi
ncl
ude

 Dr
awacont
rol
graph(
todet
ermi
nedi
ff
erentpr
ogr
am pat
hs)
 Cal
cul
ate 
Cycl
omaticcomplexi
ty 
(met
ri
cstodet
ermi
net
henumberofi
ndependentpat
hs)
 Fi
ndabasissetofpat
hs
 Gener
atet
estcasestoexer
ciseeachpat
h

Benef
it
sofbasi
spat
htest
ing

 I
thelpstoreducetheredundanttest
s
 I
tfocusesattenti
ononprogram l
ogic
 I
thelpsfaci
li
tatesanal
yti
calver
susarbi
tr
arycasedesign
 Testcaseswhichexerci
sebasissetwil
lexecut
eeverystat
ementi
npr
ogr
am atl
eastonce

3.Whatar
etheel
ement
soff
lowgr
aph?Expl
ainwi
thanexampl
e. (
APRI
L2014)

Intr
oduction
FlowGr aphi sdefi
nedasaf unctioninapr ogram thatcanber epresentedasacont r
olflowgr aph
andt henodesi nthef lowgr aphar edef i
nedaspr ogr am statement swhi lethedirect
ededgesar e
theflowofcont rol
.AFl owGr aphconsi stsofnodesandedges.Thet wonodesi ntheFl owGr aph
canbeei therunconnect edorconnect edbyanedgei neit
herdi recti
onorconnect edbyanedgei n
alldi
recti
ons.Whi l
etr acingapat hf r
om asour cet oasi nkabackedgei sanedget hatleadsback
toanodet hathasalreadybeenv isi
ted.TheFlowGr aphcont ainsonesour cenodeandonesi nk. 
Asour cenodei sthenodet hathasnoi ncomi ngedgeswhi leasi nknodei sthenodewi thno
outgoingedges.Apr ogr am'sf uncti
onmaycont ainmor ethanonesi nknode, butt
hisgraphcanbe
convertedi nt
oagr aphwi thonl yonesi nk.Therear esomel anguagest hatallow moret hanone
source.Thisconstructisv eryrareandnotusedi nSt r
ucturedPr ogrammi ng.
 
Usedasamai ntoolfort estcasei denti
fi
cati
on.

1.Repr esentsthe rel


ationship between pr ogram segment
s,thati sthe sequence of
st
at ement shavi
ngthepr oper
tythati
fthef i
rstmemberofthesequencei
sexecutedthenal
l
otherst at
ementsinthatsequencewi l
lalsobeexecuted.
2.Nodesr epr
esentoneprogram segment .
3.Thear eaboundedbyedgesandnodesar ecall
edregi
ons.

Fl
ow-
Graph-
Symbol
s

St
andar
dnot
ati
onsusedi
nconst
ruct
ingaf
lowgr
aphar
easi
nthef
oll
owi
ng.

Toi
ndi
cat
eaSequence:

Toi
ndi
cat
e"I
F-THEN-
ELSE"
:

Toi
ndi
cat
ea"
WHI
LE"Loop:

Toi
ndi
cat
ea"
Repeat
-Unt
il
"Loop:

Toi
ndi
cat
ea"
CASE"St
atement
:

OnaFl
owGr
aph:

 Ar
rowscall
ededgesi
ndicat
esfl
owofcontrol
.
 Ci
rcl
escal
lednodesi
ndi
catesoneormoreacti
ons.
 Ar
easboundedbyedgesandnodesarecal
ledregi
ons.
 Apredi
cat
enodeisanodecontai
ningacondi
ti
on.

4.Expl
aint
hemodel
ofdomai
ntest
ing.(
10mar
ks) (
NOV2015)
Whati
sDomai
nTest
ing?

Domain 
Testi
ng 
isat y
peof  
Functi
onalTesti
ng whi
cht eststheappli
cat
ionbygi
vingi
nputsand
eval
uati
ngitsappropriat
eoutputs.Itisasof t
waretest i
ngtechni
queinwhichtheoutputofa
syst
em hastobet estedwit
hami nimum numberofi nputsinsuchacaset oensur
et hatt
he
syst
em doesnotacceptinval
idandoutofrangeinputvalues.

Oneofthemosti mportant
 WhiteBoxTest ing methodisadomai ntest
ing.Themai ngoaloft he
Domaintest
ingistocheckwhet herthesystem acceptstheinputwi
thi
nt heacceptablerangeand
del
iv
erstherequir
edoutput.Also,itveri
fi
est hesystem shoul
dnotacceptthei nputs,condi
ti
ons
andindi
cesoutsi
dethespecif
iedorv ali
drange.

Domai
ntest
ingi
sdi
ff
erentf
rom domai
nspeci
fi
cknowl
edgey
ouneedt
otestasof
twar
esy
stem.

I
ndomaint esti
ng,wediv
ideadomainint
osub-domains(equival
enceclasses)andt
hentestusi
ng
val
uesfr
om eachsubdomai n.Forexampl
e,i
fawebsi t
e( domai n)hasbeengivenfort
esti
ng,we
wil
lbedi
vidingthewebsi
teint
osmallpor
ti
ons(subdomain)fortheeaseoftesti
ng.

Domai
nmi
ghti
nvol
vet
est
ingofanyonei
nputv
ari
abl
eorcombi
nat
ionofi
nputv
ari
abl
es.

Si
mpl
erpr
act
iceofdomai
ntest
ing

Practi
ti
oner
sof t
enst udythesimplestcasesofdomai
ntest
ing l
esst
hant
wo ot
hernames,
"boundaryt
est
ing"and"equi
val
enceclassanal
ysi
s."

Boundarytest
ing 
-Boundaryv
alueanaly
sis(BVA)isbasedontest
ingatt
heboundari
esbetween
par
ti
tions.Wewi l
lbet
esti
ngboththeval
idandinv
ali
dinputv
aluesi
nthepar
ti
ti
on/
classes.

Equiv
alenceClasstesti
ng 
-Thei
deabehi ndthi
stechniquei
stodi
vi
de(i.
e.topar
ti
ti
on)asetoft
est
condit
ionsintogroupsorsetsthatcanbeconsi deredthesame(i
.e.thesyst
em shoul
dhandle
them equi
valent
ly)
,hence'
equi
valencepart
it
ioni
ng.'

Thatsi
mpl
i
fiedf
orm appl
i
esf
orDomai
ntest
ing–

1.Onl
ytot
est
sofinputvar
iabl
es
2.Onl
ywhent
est
edatt hesyst
em l
evel
3.Onl
ywhent
est
edoneatat i
me
4.Onl
ywhent
est
edi naverysuper
fi
cial
way

I
tcanbesi
mpl
i
fiedasbel
ow:

Expl
anat
ion:

1.I
faf i
eldacceptsr
angesfrom 0-100,thefiel
dshoul
dnotaccept-
1and101ast
heyar
e
i
nval
i
dentriesandbeyondtheboundari
es.
2.Thef
iel
dshouldacceptval
uessuchas0, 100andanynumberbet
weent
hem.

Bui
l
dingt
abl
eli
ket
hese(
inpr
act
ice)

1.Tobuildanequi valencecl assanal ysi


sov ertimeputt heinfor
mationint
oaspr eadsheet
.
Star
tbyl isti
ngvari
ables.Addi nf ormati
onaboutt hem asy ouobt
aini
t .
2.Thetableshoul dev entuallycont ai
nallvariabl
es.Thi
smeans,al li
nputvari
abl
es,allout
put
vari
ables, andanyintermedi at
ev ari
ablesthatyoucanobser ve.
3.I
npr actice,mostt ablest hatIhav eseenar eincomplete.Thebestonesseenl i
stallthe
vari
ablesandadddet ailforcri
ticalvari
ables.

Domai
nTest
ingSt
rat
egy

Whi
l
edomai
ntest
ing,
youneedt
oconsi
derf
oll
owi
ngt
hings,
1.Whatdomainarewetesti
ng?
2.Howtogrouptheval
uesintocl
asses?
3.Whi
chv al
uesofthecl
assestobetest
ed?
4.Howtodeter
minetheresul
t?

Whatdomai
nar
ewet
est
ing?

Anydomainwhichwet esthassomeinputfuncti
onali
tyandanoutputf
uncti
onal
it
y.Ther
ewi
l
lbe
someinputv
ari
ablest
obeent er
ed,andtheappropri
ateoutputhast
obeveri
fi
ed.

5.Wr
it
eshor
tnot
eon:
pat
hsum andpat
hpr
oduct
.
PATHSUMS:

 The" +"si
gnwasusedt odenot et hefactthatpat
hnameswer epartofthesamesetof
paths.
 The" PATHSUM"denot espat hsinpar al
lel
betweennodes.
 Linksaandbi nFigure5.1aar epar al
l
elpathsandar edenotedbya+b.Si mi
larl
y,l
i
nksc
anddar eparal
lelpat
hsbet weent henexttwonodesandar edenot
edbyc+d.
 Thesetofallpathsbet weennodes1and2canbet houghtofasasetofpar al
l
elpat
hs
anddenotedbyeacf +eadf+ebcf+ebdf.
 IfXandYar eset sofpathst hatliebetweent hesamepai rofnodes,t
henX+Ydenotes
theUNI ONofthosesetofpat hs.Forexampl e,i
nFigure5.2:

PATHPRODUCTS:

 Nor mallyflowgraphsusedt odenoteonlycont r


olflowconnect i
vity.
 Thesi mpl estweightwecangi v et
oal i
nkisaname.
 Usinglinknamesaswei ghts,wethenconv ertthegr aphicalfl
owgr aphintoanequival
ent
algebraiclikeexpressionswhi chdenot esthesetofal lpossiblepat hsfrom ent
rytoexit
forthef lowgraph.
 Everylinkofagr aphcanbegi venaname.
 Thel i
nknamewi llbedenot edbylowercasei tali
cletters.
 Intracingapat horpat hsegmentt hroughaf l
owgr aph, youtraverseasuccessionofl i
nk
names.
 Thenameoft hepat horpat hsegmentt hatcor r
espondst othosel i
nksi sexpressed
naturallybyconcat enatingthoselinknames.
 Forexampl e,ifyout raverselinksa,b,
canddal ongsomepat h,thenamef orthatpath
segmenti sabcd.Thi spat hnamei salsocalleda pat hpr oduct.
 Figur
e5. 1showssome
exampl es:

6.Li
stoutt
hev
ari
ousdat
afl
owst
rat
egi
es.Expl
ain.

 I
NTRODUCTION:
o DataFlowTest ingSt r
ategiesar estructuralstrategies.
o Incontrasttothepat h-testingstr
ategies, data-fl
owst r ategiestakeintoaccountwhathappens
todataobjectsont heli
nksi nadditiontot her awconnect i
vi
t yofthegraph.
o Inotherwor ds,
dat aflowst rategi
esr equiredat a-f
lowl i
nkwei ghts(d,k,
u,
c,
p).
o DataFlowTest ingSt r
ategiesar ebasedonsel ecti
ngt estpat hsegment s(
alsocal
led 
subpaths)
thatsati
sfysomechar acteristi
cofdat aflowsf oralldat aobj ect
s.
o Forexampl e,al
l subpathst hatcontainad( oru, k,du,dk) .
o Ast r
ategyXi s 
st r
onger thananot herstrategyYi falltestcasespr oducedunderYareincl
uded
inthoseproducedunderX-conv erselyfor weaker .
 TERMI
NOLOGY:

1. Defi
niti
on-ClearPathSegment ,wi t
hr especttovari
ableX,i saconnectedsequenceofl i
nks
suchthatXi s(possi
bly)definedont hefir
stli
nkandnotr edefi
nedorkil
ledonanysubsequent
l
inkoft hatpathsegment .l
lpat hsi nFigure3.9aredefiniti
onclearbecausev ari
ablesXandY
aredef i
nedonl yont hef i
rstlink( 1,3)andnott her
eaf ter.InFigur
e3. 10,wehav eamor e
complicatedsit
uati
on.Thef oll
owi ngpat hsegmentsaredef ini
ti
on-cl
ear:(
1,3,
4),(1,
3,
5),(
5,6,
7,
4),
(7,
8,
9,6,7),(
7,8,
9,
10),(
7,8,10),(7,8,
10,11).Subpath(1,
3,4,5)isnotdef i
nit
ion-
clearbecausethe
vari
ablei sdef i
nedon( 1,3)andagai non( 4,
5).Forpr acti
ce,tryf i
ndingallthedef ini
tion-cl
ear
subpathsf orthisroutine( i.
e. ,foral
l var
iables).
2. Loop- FreePat hSegment  isapat hsegmentf orwhi chev erynodei ni ti
sv i
sit
edat mostonce.
ForExampl e,path(4,5,6,7,8,10)i nFigure3. 10isloopf ree,butpat h(10,11,
4,5,
6,7,
8,10,11,12)is
notbecausenodes10and11ar eeachv i
sitedtwice.
3. Si mplepat hsegment  i
sapat hsegmenti nwhi chatmostonenodei sv i
sitedt wi ce.For
exampl e,inFigure3. 10,( 7,4,5,6,
7)isasi mpl epathsegment .Asi mpl epathsegmenti sei t
her
l
oop-freeori fthereisal oop, onlyonenodei sinvolv
ed.
4. A  dupat h f
rom nodeit oki sapat hsegmentsucht hati fthelastli
nkhasacomput ati
onaluse
ofX, t
hent hepat hissi mpl eanddef init
ion-clear;
ifthepenul ti
mat e(l
astbutone)nodei sj -t
hat
i
s, t
hepat hi s(i
,p,
q,..
.,
r,
s,t,j
,k)andl i
nk( j
,
k)hasapr edicat euse-t hent hepathfrom it oji sboth
l
oop-freeanddef i
niti
on- clear.
 STRATEGI ES: 
The st r
ucturalt estst rat
egies di scussed bel ow ar e based on t he pr ogram' s control
fl
owgraph.Theydi fferintheext entt owhi chpr edicateusesand/ orcomput at i
onalusesofv ar i
ablesare
i
ncluded int het estset .Var ioust ypesofdat af l
ow t esting st r
ategiesin decreasing or deroft heir
eff
ecti
venessar e: 

1. Al
l-duPat hs( ADUP): 
Theall-
du-paths(ADUP)str
ategyisthestrongestdat
a-f
low test
ing
st
rat
egydi
scussedher e.I
trequi
resthatever
ydupathfrom ev
erydef
init
ionofev
eryvar
iableto
ev
eryuseofthatdefi
niti
onbeexercisedundersometest.

Forvari
abl
eXandY: InFigure3.9,becausevari
abl
esXandYareusedonl
yonl i
nk(1,
3),any
testt
hatstar
tsatt
heentrysati
sfi
esthiscri
ter
ion(f
orv
ari
abl
esXandY,
butnotf
orall
vari
ables
asrequi
redbythestr
ategy)

Forv ar
iableZ:  Thesit
uati
onf orv ariableZ( Figure3.10)ismor ecompl icat
edbecauset he
vari
ableisr edef i
nedinmanypl aces.Fort hedef i
niti
ononlink(1,3)wemustexer ci
sepaths
thati
ncludesubpat hs(
1,3,
4)and( 1,3,
5) .Thedef i
nit
iononli
nk(4,5)iscoveredbyanypat ht
hat
i
ncludes( 5,6),suchassubpath( 1,3,4,5,6,.
..
).The( 5,
6)defi
nit
ionr equi
respathsthatincl
ude
subpaths( 5,6,
7,4)and(5,
6,
7,8)

Forv ari
abl
eV:  
Var i
ableV( Fi
gure3. 11)isdef inedonl yonceonl i
nk( 1,3).BecauseVhasa
predi
cat euseatnode12andt hesubsequentpat htot heendmustbef orcedf orbot h
dir
ectionsatnode12,t heall
-du-pathsstrategyf orthisvariablerequirest hatweexer ciseal
l
l
oop-freeentry/
exitpat hsandatl eastonepat ht hatincl
udest heloopcausedby( 11,4).Note
thatwemustt estpat hst hatincludebothsubpat hs( 3,
4,5)and( 3,5)ev ent houghnei therof
thesehasVdef i
niti
ons.Theymustbei ncludedbecauset heypr ovi
deal ternatedupat hst othe
Vuseonl i
nk(5,6).Alt
hough( 7,4)i snotusedi nthet estsetforv ar
iableV, itwil
lbei ncludedin
thetestsetthatcoverst hepredicateusesofar rayv ari
ableV( )andU.  

Theall-
du-pat
hsst r
ategyisast r
ongcrit
erion,butitdoesnott
akeasmanyt est
sasitmi ght
seem atfi
rstbecauseanyonet estsi
multaneouslysati
sfi
est
hecri
ter
ionf
orsever
aldef
ini
ti
ons
andusesofsev eral
diff
erentv
ariabl
es.
 

2. AllUsesStart
egy(AU):Theallusesst r
ategyist
hatatl eastonedefini
ti
onclearpathf r
om ev er
y
defi
niti
onofeveryvar
iabletoev eryuseofthatdefi
nit
ionbeexer ci
sedundersomet est.Justas
wer educedourambitionsbyst eppingdownf rom allpaths(P)tobr anchcoverage( C2),say,
wecanr educethenumberoft estcasesbyaskingthatt hetestsetshouldincl
udeatl eastone
pathsegmentf r
om everydefi
nitiontoeveryusethatcanber eachedbyt hatdef
ini
tion.
 

Forvari
ableV: 
InFigure3.11,ADUPrequir
est hatwei ncludesubpaths(3,
4,
5)and(3,5)insome
testbecausesubsequentusesofV, suchasonl i
nk( 5,
6) ,canbereachedbyei
theralter
nat i
v e.
I
nAUei t
her(3,
4,5)or(3,
5)canbeusedt ost artpat
hs, butwedon' thavetouseboth.Similarly,
wecanski pthe(8,10)li
nki fwe'
veincludedt he( 8,
9,10)subpath.Notethehole.Wemust
i
nclude(8,9,
10)insomet estcasesbecauset hat
'stheonl ywaytor eacht
hecuseatl i
nk( 9,10)
-butsupposeourbugf orv ari
abl
eVi sonl ink(8,10)af teral
l?Findacoveri
ngsetofpat hs
underAUf orFi
gure3.11. 

3. Allp-uses/somec-usesst r
ategy( APU+C):  
Forev eryv ar
iableandever
ydef i
nit
ionofthat
vari
able,i
ncludeatleastonedefinit
ionfreepathfrom thedef i
nit
iont
oeverypredi
cateuse;i
f
ther
ear edefini
ti
onsoft hevar
iablesthatarenotcov eredbyt heabovepr
escr
ipti
on,thenadd
comput at
ionaluset
estcasesasr equir
edt ocovereverydefi
niti
on. 

Forv ar
iabl
eZ:I
nFigure3. 10,f
orAPU+Cwecansel ectpathst hatallt
aket heupperl i
nk(12,13)
andt heref
orewedonotcov erthec- useofZ:butt hat'sokayaccor dingt ot hest r
ategy '
s
defini
ti
onbecauseev erydefinit
ioni scovered.Links( 1,3)
,( 4,
5),(5,
6),and ( 7,8)mustbe
i
ncludedbecauset heycont ai
ndef i
niti
onsforvari
ableZ.Li nks( 3,
4),(
3,5),(8,9),(8,
10),(9,6)
,
and( 9,
10)mustbei ncludedbecauset heycontai
npredicateusesofZ.Fi ndacov eringsetof
testcasesunderAPU+Cf oral
l v
ariablesint
hisexample-i tonlytakestwot ests. 

For v
ari
abl
e V:
In Fi
gur
e 3.
11, APU+C i
s achi
eved f
or V by
(
1,3,
5,
6,7,
8,
10,11,4,
5,
6,7,
8,
10,11,
12[
upper
],13,
2)and(1,
3,
5,
6,
7,8,
10,
11,
12[
lower
],13,
2).Not
ethat
t
hec-useat(9,10)neednotbeincl
udedundertheAPU+Ccr
it
eri
on.
 

4. Allc-
uses/somep- usesstrat
egy(ACU+P): 
Theallc-
uses/
somep-usesst
rat
egy(ACU+P)i
sto
fi
rstensurecov eragebycomput ati
onalusecasesandifanydef
ini
tioni
snotcover
edbythe
previ
ouslyselectedpat hs,addsuchpredi
cateusecasesasareneededtoassuret
hatever
y
defi
nit
ionisincludedinsomet est.
 

Forv ari
ableZ: I
nFi gur
e3. 10,ACU+P cov er
ageisachi
evedforZbypat h( 1,
3,
4,5,
6,
7,8,10,
11,12,
13[l
ower],2),butthepredicateusesofsever
aldef
ini
ti
onsarenotcov
ered.Specif
icall
y,
the(1,3)defi
nit
ionisnotcov er
edf orthe(3,
5)p-
use,t
he(7,
8)def
ini
ti
onisnotcover
edf orthe
(8,
9),(9,
6)and(9,10)p-uses. 

Theabov
eexamplesimpl
yt hatAPU+Ci sst
rongerthanbranchcov
eragebut
ACU+Pmaybeweakert
han,orincompar
ablet
o,branchcov
erage.

5. AllDefi
nit
ionsSt
rat
egy(
AD): Theal
ldef
init
ionsstr
ategyasksonl
yever
ydefi
nit
ionofever
y
vari
abl
ebecov er
edbyatl
eastoneuseofthatvar
iabl
e,bethatuseacomput
ati
onaluseora
predi
cateuse.
 

Forvari
ableZ: 
Pat
h( 1,
3,
4,5,
6,
7,
8,...)sat
isf
iest
hiscr
it
eri
onf
orv
ari
abl
eZ,wher
easany
ent
ry/
exitpat
hsati
sfi
esi
tforvar
iabl
eV.
 

Fr
om thedef
ini
ti
onoft
hisst
rat
egywewoul
dexpecti
ttobeweakert
hanbot
h
ACU+PandAPU+C.

6. AllPredi
cateUses(APU) ,AllComput ati
onalUses( ACU)Strat
egi
es: Theallpredi
cateuses
str
ategyisder
ivedfrom APU+Cst rategybydr oppingther
equir
ementthatweincludeac-use
forthevari
abl
eiftherearenop- usesf orthev ar
iabl
e.Theal
lcomputati
onalusesstrat
egyis
deri
vedfrom ACU+Pst rategybydr oppingther equir
ementthatweincludeap- useforthe
vari
ablei
fther
earenoc-usesf orthev ar
iabl
e. 

7.Wr
it
enot
esont
ransact
ionsf
low.
(10mar
ks) (
JULY2012)

I
ntr
oduct
ion:
Whi
teboxt
est
ingi
sat
est
ingt
echni
quet
hatexami
nest
hepr
ogr
am st
ruct
ureandder
ivest
estdat
a
f
rom t
hepr
ogr
am l
ogi
c/code.Theot
hernamesofgl
assboxt
est
ingar
ecl
earboxt
est
ing,open
boxt
est
ing,
logi
cdr
ivent
est
ingorpat
hdr
ivent
est
ingorst
ruct
ural
test
ing.

Whi
teboxt
est
ingi
sal
soknownasst
ruct
uredbased.Thi
sst
ruct
uredbasedt
est
ingt
echni
ques
whi
char
eal
sody
nami
crat
hert
hanst
ati
cuset
hei
nter
nalst
ruct
ureoft
hesof
twar
etoder
ivet
he
t
estcasest
heyar
ecommonl
ycal
l
edwhi
teboxorgl
assboxt
echni
ques.I
mpl
yi
ngy
oucanseei
nto
t
hesy
stem si
ncet
heyr
equi
redknowl
edgeofhow t
hesof
twar
eisi
mpl
ement
edt
hati
show i
t
wor
ks,f
orexampl
e,ast
ruct
uralt
echni
quemaybeconcer
nedwi
tht
heexci
singl
oopsi
nthe
sof
twar
e.

Whi
teBoxTest
ingTechni
ques:
 St
atementCov
erage-Thi
stechni
quei
sai
medatexer
cisi
ngal
lpr
ogr
ammi
ngst
atement
s
wi
thmi
nimal
test
s.
 Br
anchCov
erage-Thi
stechni
quei
srunni
ngaser
iesoft
est
stoensur
ethatal
lbr
anchesar
e
t
est
edatl
eastonce.
 Pat
hCov
erage-Thi
stechni
quecor
respondst
otest
ingal
lpossi
blepat
hswhi
chmeant
hat
eachst
atementandbr
anchi
scov
ered.
At
ransact
ioni
sauni
tofwor
kseenf
rom asy
stem user
'spoi
ntofv
iew.At
ransact
ionconsi
stsofa
sequenceofoper
ati
ons,someofwhi
char
eper
for
medbyasy
stem,per
sonsordev
icest
hatar
e
out
sideoft
hesy
stem.Tr
ansact
ionbegi
nswi
thBi
rt
hthati
stheyar
ecr
eat
edasar
esul
tofsome
ext
ernalact
.Att
heconcl
usi
onoft
het
ransact
ion'
spr
ocessi
ng,t
het
ransact
ioni
snol
ongeri
nthe
sy
stem.

Exampl
eofat
ransact
ion:
 
Atr
ansact
ionf
oranonl
i
nei
nfor
mat
ionr
etr
iev
alsy
stem mi
ghtconsi
stof
t
hef
oll
owi
ngst
epsort
asks:
 Accepti
nput(
tent
ati
vebi
rt
h)
 Val
i
dat
einput(
bir
th)
 Tr
ansmi
tacknowl
edgmentt
orequest
er
 Doi
nputpr
ocessi
ng
 Sear
chf
il
e
 Requestdi
rect
ionsf
rom user
 Accepti
nput
 Val
i
dat
einput
 Pr
ocessr
equest
 Updat
efi
l
e
 Tr
ansmi
tout
put
 Recor
dtr
ansact
ioni
nlogandcl
eanup(
deat
h)

8.Expl
aint
heconceptofpat
hinst
rument
ati
on. (
NOV2013)

PATHI
NSTRUMENTATI
ON:

Pathinst
rumentat
ioni
swhatwehav
etodot
oconf
ir
mthatt
heout
comewasachi
evedbyt
he
i
ntendedpath.

Co-
inci
dentalCorrect
ness:
 The coi
nci
dent
alcor
rect
ness st
ands f
orachi
evi
ng t
he desi
red
out
comef orwrongreason.
 

Theabovef i
gureisanexampl eofarouti
nethat
,forthe(unfortunatel
y)choseninputvalue(
X=
16),y
iel
dsthesameout come( Y=2)nomat t
erwhichcasewesel ect
.Therefor
e,thetest
schosen
thi
swaywi l
lnottel
luswhet herwehaveachi
evedcoverage.Forexampl e,t
hef i
vecasescouldbe
tot
all
yjumbledandsti
lltheoutcomewouldbethesame. PathInstrumentat
ion 
iswhatwehav eto
dotoconfi
rmt hatt
heout comewasachiev
edbytheint
endedpat h.

Thet
ypesofi
nst
rument
ati
onmet
hodsi
ncl
ude:

I
nter
pret
iveTr
acePr
ogr
am:

Anint
erpret
ivetr
aceprogr
am isonethatexecutesever
ystat
ementi
norderandr
ecor
ds
thei
nter
mediateval
uesofall
calcul
ati
ons,
thestatementl
abel
str
aver
sedetc.

Ifwerunthetestedr
out
ineunderat
race,t
henwehaveal
lthei
nfor
mat
ionweneedt o
confi
rmtheoutcomeand,fur
ther
mor
e,toconf
ir
mthati
twasachiev
edbythei
ntended
path.

Thetroubl
ewi t
ht r
acesisthatt
heygi
veusfarmoreinf
ormati
onthanweneed.I
nfact,
the
ty
picaltr
acepr ogram pr
ov i
dessomuchinfor
mationthatconf
irmi
ngthepathfrom it
s
massiveoutputdumpi smor eworkt
hansi
mulati
ngthecomputerbyhandtoconf
irmthe
path.
Tr
aver
sal
Mar
kerorLi
nkMar
ker
:

Asi
mpl
eandef
fect
ivef
orm ofi
nst
rument
ati
oni
scal
l
edat
rav
ersal
mar
kerorl
i
nkmar
ker
.

Nameev
eryl
i
nkbyal
owercasel
ett
er.

I
nst
rumentt
hel
i
nkssot
hatt
hel
i
nk'
snamei
srecor
dedwhent
hel
i
nki
sexecut
ed.

Thesuccessi
onoflet
ter
sproducedingoingfr
om ther
out
ine'
sent
ryt
oit
sexi
tshoul
d,i
f
ther
earenobugs,
exactl
ycorr
espondtothepathname.
 

WhySi ngl
eLinkMarker
saren'
tenough:
 
Unfor
tunat
ely
,asi
ngl
eli
nkmar
kermaynotdot
het
ri
ck
becauseli
nkscanbechewedbyopenbugs.

Wei nt
endedt
otr
averset
heikm path,
butbecauseofarampagingGOTOi
nthemiddl
eofthem
l
ink,wegot opr
ocessB.Ifcoi
ncidentalcor
rect
nessi
sagainstus,t
heout
comeswi l
lbethe
sameandwewon'tknowaboutthebug.

TwoLi
nkMar
kerMet
hod:

Thesol
uti
ontotheprobl
em ofsi
ngl
elinkmarkermethodi
stoi
mpl
ementt
womar
ker
sper
l
ink:
oneatthebegi
nni
ngofeachl
inkandonattheend.

Thetwol
inkmar
ker
snowspeci
fyt
hepat
hnameandconf
ir
m bot
hthebegi
nni
ngandendof
thel
i
nk.
 

Li
nkCount er

Al essdi
srupti
ve( andlessinformati
ve)inst
rumentati
onmet hodisbasedon
count
ers.Insteadofauni
quel i
nknamet obepushedi ntoastri
ngwhent hel
inkistr
aversed,
we
si
mplyincremental i
nkcounter.Wenowconf irmthatthepathlengt
hisasexpected.Thesame
probl
em thatledustodoubleli
nkmar kersal
soleadsust odoubleli
nkcount
ers.

9.Whati
sInt
erf
aceTest
ing?Descr
ibe.
(10mar
ks) (
NOV2014)

Whati
sInt
erf
aceTest
ing?

Int
erf
ace Testi
ng i
st he t
est
ing done on AUT whi
ch act
ual
l
yv er
if
ies whet
hert
he
communicati
onbetweentwodi
ffer
entsof
twaresy
stemsar
edonecor
rect
ly.

A connect
ionthatint
egratest wocomponentsar ecall
edinterf
ace.Thi
sinter
faceina
computerworld could be any t
hing l
i
ke API'
s,web services,etc.Test
ing ofthese
connect
ingser
vicesorint
erfaceisref
err
edasInter
faceTest
ing.

I
nter
faceisactual
lysof
twar
ethatconsi
stsofset
sofcommands,messages,andot
her
at
tri
butest
hatenabl
ecommunicat
ionbet
weenadeviceandauser
.

I
nter
faceTest
ingi
ncl
udet
est
ingoft
womai
nsegment
s:

1.Webser
verandappl
icat
ionserv
erint
erf
ace
2.Appl
i
cat
ionser
verandDatabaseserv
erint
erf
ace.

Forabov
ement
ionedscenar
ios,
thei
nter
facet
est
ingi
sdonet
o

 Checkser
ver
sar
eexecut
edpr
oper
lyornot
 Err
orsarehandl
edproper
lyorret
urnsaner
rormessageforanyquerymadeby
appl
icat
ion
 Checktheout
comeswhenconnect
iont
owebser
veri
sreseti
nbetween

Whyt
odoI
nter
faceTest
ing
I
nter
faceTest
ingi
sdone

 Toensuret hatend-usersorcustomershouldnotencounteranyprobl
em whenusing
aparti
cularsoftwareproduct
 Toidenti
fywhi chapplicat
ionareasareusuall
yaccessedbyend- user
sandt ocheck
i
tsuser-f
riendl
inessaswel l.
 To veri
fysecur it
yr equir
ement s whi
le communi cat
ion pr
opagates bet
ween the
syst
ems
 Tochecki fsolut
ioniscapabletohandlenetworkfail
uresbetweenappl
icat
ionser
ver
andwebsi te

Ty
pesofI
nter
faceTest
ing
Dur
ingI
nter
faceTest
ingv
ari
oust
ypesoft
est
ingdoneoni
nter
facewhi
chmayi
ncl
ude

 Wor kfl
ow: 
Itensur esthatt hei nt
erf
aceenginehandl esyourst andardwor kfl
owsas
expected.
 Edgecases- unexpect edv alues:Thi
sisconsideredwhent est
ingincludedate,month
anddayr eversed.
 Performance,l oad,and net wor ktesti
ng:A hi gh-
v ol
ume i nterf
ace may r equi
re
mor e 
LoadTest i
ng t
hanal ow-vol
umei nt
erf
ace,dependi ngont heinter
faceengine
andconnect i
vityinfr
astructure
 Indi
v i
dualsystems:  Thi
si nclude t
esti
ng each system i ndivi
duall
y .Forexampl e,
bil
li
ngsy st
em andi nventor ymanagementsy stem forretailstoreshouldbeabl eto
operateseparately.

I
nter
faceTest
ingSt
rat
egy
Totestaninter
facewit
hcommont est
sr egardl
essofimplementat
ion,y
oucanusean
abst
ractt
estcase,and t hen cr
eate concret
ei nst
ances ofthe 
TestCase 
foreach
i
mplement
ationofthei
nter
face.

 Thebaseorabstr
acttestcaseperf
ormst
hei mplement
ati
on-neut
ralt
ests
 Whil
etheconcreteteststakecareofi
nstanti
ati
ngtheobjecttotest
,andper
for
m
anyi
mplementati
on-
specifi
ctest
s.

I
nter
faceTest
ingVsI
ntegr
ati
onTest
ing

Anintegrat
iontestty
pethati
sconcer
nedwit
h Test
ingper
for
medtoexposedef
ect
sinthei
nte
test
ingtheinter
facesbet
weencomponent
sor and i n the i
nter
acti
ons between inte
sy
stems component
sorsy
stems.

10.Expl
ainanyf
ivebugsi
nDomai
nEr
ror
s. (
NOV2015)

Domai
nEr
ror
s:

 Doubl eZer oRepr esentation: Incomput er sorLanguagest hathav eadi stinctposi t


ive
andnegat i
v ezer o,boundar yer rorsfornegat i
v ezer oar ecommon.
 Floatingpoi ntzer ocheck: Af loat i
ngpoi ntnumbercanequalzer oonl yift hepr evi
ous
def i
nitionoft hatnumberseti ttozer oori fitissubt r
actedf rom i tsel formul ti
pliedby
zero.Sot hef l
oat i
ngpoi ntzer ocheckt obedoneagai nstaepsi lonv alue.
 Cont radi ctor y domai ns:An i mpl ement ed domai n can nev er be ambi guous or
cont radi ctory ,butaspeci f
ieddomai ncan.Acont radictorydomai nspeci f
icati
onmeans
thatatl eastt wosupposedl ydi stinctdomai nsov er lap.
 Ambi guous domai ns:Ambi guous domai ns means t hat uni on of t he domai ns is
i
ncompl et e.Thati st herear emi ssingdomai nsorhol esint hespeci fi
eddomai ns.Not
speci fyingwhathappenst opoi ntsont hedomai nboundar yisacommonambi gui
ty .
 Ov erspeci fi
edDomai ns:hedomai ncanbeov erloadedwi thsomanycondi ti
onst hatt he
resulti sanul ldomai n.Anot herwayt o puti ti st o sayt hatt hedomai n'spat hi s
unachi ev able.
 Boundar yEr rors:Errorscaused i n and ar ound t heboundar yofadomai n.Exampl e,
boundar ycl osur ebug, shifted, til
ted,mi ssing,ext raboundar y.
 Closur e Rev ersal:A common bug.The pr edicat ei s def i
ned i nt erms of>=.The
progr ammerchoosest oi mpl ementt hel ogicalcompl ementandi ncor r
ectl
yuses<=f or
thenewpr edicate;i.e.,x>=0i si ncorrectlynegat edasx<=0,t herebyshi fti
ngboundar y
valuest oadj acentdomai ns.
 Faulty Logi c:Compound pr edicates ( especi ally) ar e subj ect t o f aulty l ogic
transf ormat ionsandi mpr opersi mpl if
ication.Ifthepr edicatesdef i
nedomai nboundar i
es,
allkindsofdomai nbugscanr esul tfrom f aul
tylogi cmani pulations.

PART–C:
-(10MARKS) (
JULY2014)

1.Wr
it
edet
ail
ednot
esondomai
nsandpat
h.

I
NTRODUCTI
ON:

a.Domai n:I
nmat hematics,domaini
sasetofpossi blev al
uesofani ndependant
variableort hev ari
ablesofafunct
ion.
b.Pr ogr amsasi nputdat aclassi
fi
ers:domai nt est i
ngat temptst o determine
whet hert hecl assifi
cati
onisorisnotcor r
ect.
c.Domai nt estingcanbebasedonspeci fi
cati
onsorequi valentimplement ati
on
i
nf ormat i
on.
d.I fdomai ntest i
ngi sbasedonspecificat
ions,i
tisaf uncti
onal t
esttechnique.
e.I fdomai nt est i
ng is based i
mplement ati
on det ail
s,iti s a str
ucturaltest
techni que.
f. Forexampl e,y ou'r
edoi ngdomaint est
ingwheny oucheckext r
emev aluesof
ani nputv ariable.

Alli
nputstoapr ogram canbeconsider
edasift heyar
enumber s.For
example,achar
acterstri
ngcanbet
reat
edasanumberbyconcatenat
ingbit
s
andlookingatthem asi ft
heywereabinar
yint
eger.Thi
sist heview i
n
domaintesti
ng,
whi chiswhythi
sst
rat
egyhasamathemati
calf
lavor
.

2.THEMODEL: 
Thefol
lowi
ngfigur
eisaschemat
icrepr
esent
ati
onofdomai
ntest
ing.
a.Bef
oredoingwhateveritdoes,arout
inemustclassi
fyt
heinputandsetit
movingontheri
ghtpath.
b.Ani nval i
di nput( e.g.,valuet oobi g)isj ustaspeci alpr ocessi ngcasecal l
ed
'
reject'
.
c.Thei nputt henpasssest oahy pot heti
cal subr outiner athert hanoncal cul
at ions.
d.I ndomai nt esting,wef ocusont hecl assificat i
onaspectoft her outiner ather
thanont hecal cul ations.
e.St ructural knowl edgei snotneededf ort hismodel -onl yaconsi stent,compl et e
specificationofi nputv aluesf oreachcase.
f. Wecani nfert hatf oreachcaset heremustbeat leastonepat htopr ocesst hat
case.
3.ADOMAI NI SASET:
a.Ani nputdomai ni saset .
b.I fthesour cel anguagesuppor tssetdef init
ions( E.g.PASCALsett ypesandC
enumer atedt ypes)l esst esti
ngi sneededbecauset hecompi l
erdoesmuchof
i
tf orus.
c.Domai nt est ingdoesnotwor kwel lwit
har bitr
ar ydiscr eteset sofdat aobj ect s.
d.Domai nf oral oop- freepr ogram cor r
espondst oasetofnumber sdef i
nedov er
theinputv ect or.
e.
4.DOMAINS, PATHSANDPREDI CATES:
a.I ndomai nt est ing,pr edi
cat esar eassumedt obei nter pretedi nt ermsofi nput
vectorv ariabl es.
b.I fdomai nt est i
ngi sappl iedt ost ruct
ur e,thenpr edicat ei nt
er pretati
onmustbe
based on act ualpat hs t hr ough t he r out ine -t hat is,based on t he
i
mpl ement at i
oncont rolflowgr aph.
c.Conv ersely ,ifdomai nt est i
ng i sappl ied to speci fi
cat ions,i nterpretati
oni s
basedonaspeci f
ieddat af lowgr aphf ort her out i
ne;butusual ly,asi st he
natureofspeci fications,noi nt erpret
at i
oni sneededbecauset hedomai nsar e
specifieddi rect l
y .
d.Forev erydomai n,ther eisatl eastonepat hthr ought her outine.
e.Ther emaybemor et hanonepat hi ft
hedomai nconsi st sofdi sconnect edpar ts
orifthedomai ni sdef i
nedbyt heuni onoft woormor edomai ns.
f. Domai nsar edef i
nedt heirboundar i
es.Domai nboundar iesar eal sowher e
mostdomai nbugsoccur .
g.Forev eryboundar yt herei satl eastonepr edi catet hatspeci fi
eswhatnumber s
belongt ot hedomai nandwhatnumber sdon' t. 

Forexampl
e,inthestat
ementI Fx>0THENALPHAELSEBETAweknow t hat
numbersgreat
erthanzerobelongtoALPHAprocessi
ngdomai
n(s)whi
l
ezero
andsmall
ernumbersbelongtoBETAdomain(
s).

h.Adomainmayhav
eoneormor
eboundar
ies-nomat
terhow manyv
ari
abl
es
def
inei
t.
 

Forexample,i
fthepredicateisx2+y 2<16,thedomaini
stheinsideofaci
rcl
e
ofradi
us4aboutt heor i
gin.Simi
lar
ly,wecoulddef
ineaspher
icaldomainwit
h
oneboundarybutinthreev ar
iabl
es.

i
. Domai nsar
eusual lydefi
nedbymanyboundar ysegmentsandt her
efor
eby
manypr edi
cates.i
.e.thesetofinter
pret
edpredicat
estrav
ersedonthatpat
h
(i
.e.
,thepat
h'spredicat
eexpressi
on)defi
nest
hedomai n'
sboundar
ies.

2.
Descr
ibet
hev
ari
ousst
rat
egi
esi
nvol
vedi
nDat
aFl
owTest
ing. (
APRI
L2014)

 DATAFLOW TESTING:
o Da tafl
ow testi
ngi sthenamegi ventoaf amil
yoft estst
rat
egiesbasedon
selecti
ng paths through the program's cont
rolflow in or
dert o expl
ore
sequencesofev entsrelat
edtothest at
usofdataobjects.
o F orexample,pickenoughpat hst oassuret hateverydataobjecthasbeen
init
ial
i
zedpriortouseort hatal
ldefinedobj
ectshavebeenusedf orsomethi
ng.
o Mot
ivat
ion:

i
ti sourbeliefthat
,justasonewoul dnotf eelconfi
dentabouta
program withoutexecuti
ngev er
ystatementi nitaspartofsome
test,oneshouldnotfeelconf
identaboutapr ogram wit
houthavi
ng
seent heef f
ectofusi ngthev al
uepr oducedbyeachandev er
y
comput at
ion.

 DATAFLOW MACHI NES:


o Ther earet wot ypesofdat af lowmachi neswi thdifferentarchitectures.( 1)Von
Neumannmachnes( 2)Mul ti-
inst ruct ion, mul ti
-datamachi nes(MI MD) .
o Vo nNeumannMachi neAr chitect ur e:
 Mo stcomput erst odayar ev on- neumannmachi nes.
 Th isar chitectur ef eat uresi nt er changeabl est orageofi nstructions
anddat aint hesamememor yuni t
s.
 Th eVonNeumannmachi neAr chitectureexecut esonei nstructionat
atimei nthef ollowi ng, mi cr oi nst ruct i
onsequence:
1.Fet chi nst ruct i
onf r om memor y
2.I nterpreti nstruct i
on
3.Fet choper ands
4.Pr ocessorExecut e
5.St or eresul t
6.I ncrementpr ogr am count er
7.GOTO1
o Mu lti
-i
nstruction,Mul ti-datamachi nes( MI MD)Ar chitecture:
 Th esemachi nescanf etchsev eral instr
uctionsandobj ectsi npar allel
.
 Th eycanal sodoar ithmet icandl ogi caloperationssi multaneousl yon
dif
ferentdat aobj ects.
 Th edeci sionofhowt osequencet hem dependsont hecompi ler.
 BUGASSUMPTI ON:
o Thebugassumpt ionf ordat a-flow t estingst rategiesi st hatcont rolf low is
gener all
ycor r
ectandt hatsomet hinghasgonewr ongwi t
ht hesof twaresot hat
dataobj ect sarenotav ail
abl ewhent heyshoul dbe,orsi llythingsar ebei ng
donet odat aobjects.
o Also, i
fther ei
sacont rol-fl
owpr obl em, weexpecti ttohav esy mpt omst hatcan
bedet ectedbydat a-flowanal ysis.
o Althoughwe' l
lbedoi ngdat a-flow t est ing,wewon' tbeusi ngdat aflowgr aphs
assuch.Rat her,we' lluseanor dinar ycont r
olflowgr aphannot atedt oshow
whathappenst ot hedat aobj ect sofi nterestatt hemoment .
 DATAFLOW GRAPHS:
o Thedat aflowgr aphi sagr aphconsi stingofnodesanddi rectedl i
nks.  

You might also like