20 Software Tsing: A Catsman'’s Approach, Second Edin
i, in Solera mi) gs
2 Sie Aairrns
zZ Be Seat mag?
E Boat
E State = AvaitCard
38 Case 3: Ains
2 ‘MonageTransaction mg 10
EA States Coso
28. Case 4 Closeseision
3 Y NenTransaciontoques
a “Then Sate Avian
E he PrinRecept wg
x af
E PouTramseionL ce mue 12
El Cleesession me 13
ES CenolCardRo lee) Ein
E Suse Awaiveard
37. End Cue (Se)
38 End. (Main progam SATA)
39. Prossture ValdaePIN(PINGL, PAN)
40. GAPINIOPANIPAN, ExpeceePIN) mes
Sm 2 at
2. Ce mor
Bowe km
ET SesccaDrver2. at) mg 16
Fo en) mg (7
de ERIN = Expect
ra Ten PINGK =n
x Ba SreenDaver.nal) mg 18
# ‘Ty = Secon
So a
SIL Case 2: Second
32 SeceaDriver2- aut) m
3 GanmEnerrin) sep 20
SK UF EneoaPiN'= ExpectetP
EN Ten PINK = Toe
EA Ele Sabine.) ms
En
8, Tye the
3 Cue: Tha
CT men
6 GaPINEerPIN men
EE BN = BapectedPiN.
@ Tran PINK = Tre
e Be SemenDéver(é ol) msg
6 Pike Flee
“u
1. EnaCase Cry)
SE End, (Prooadur Validate)
9. Procure GaN (Entre, Cancel)
70. Local Dat: Dipikeys = 10,1.2,3.4,5,6.7,8.9)
I. Conca = alse
TE Ent = ul ving
73 DighsReve-0
74 Do While NOT(DighsKevaed OR Cancel)
TS Keysensorkeyhi) ig 25
i
Integration Testing 221
76 KeyALIN Digi
na
Es Ent PIN = EneresPi + Kylin
By CAMEO
a Tac =
EN Then SererDiver@ X=) mag 26
E Ena
A Ido =2
54 en SeeeuDive (2 XI) mug 27
# feat
Se WäigtuRevi=3
Fa Tin ScreenDiver (2, XXX) 9928
se Elf
FA Tiguesd= à
ES "Ten Soccer (2, XXX) mg 29
si Eat saad
2 me
a “Cancel Tre
5% Enr
55. End We
3% End. Procedure GaPIN)
SATM Main contains 16 source nodes, All except node 1 are where a procedures
function call returas control: 1, 6, 7, 9, 11, 12, 15, 19, 21, 23, 27, 30, 32, 34, 35,
and 36, SATM Main contains 16 sink nodes. As with the source nodes, most of
these are at procedure/function calls: 5, 6, 8, 10, 12, 14, 17, 18, 20, 22, 26, 31,
33, 34, 35, and 38, Notice that when two sequential procedure calls are used, a
‘Satement-can-bo-both-a-sink and-a-source node. Most-Of the module execution
paths in SATM Main are very short; this pattern is due to the high density of
messages (0 other unis.
Only one nontrivial module execution path is contained in the fist 17 lines
of SATM Main: <1, 2, 3, >. Procedure call, such as <S>, <b>, <B>, <10>, <11>
and <14> are trivial in the sense that net much happens in SATM Main. Other
very short module execution paths are associated with the contro! structures —
for example, <9, 7>, ©, 10>, and «IS, 16>.
Here is the MM-Path for a correct PIN entry on the first ty. The module
execution paths are described by giving the name of the unit followed by the
sequence of he statement fragment numbers. Figure 13.11 illustrates the sequential
nature of an MM-Path using a UML-style sequence dingrum.
Main (12,3, 17, 18)
me?
ValiduePiN (59,40)
mes
GENLEPAN (o peste coe ven)
ValdaePIN 31,4248, 48)
me 16
‘SezeenDzive (no pseudocode gen)
ValinePIN ces)
IT
SEIN, 10, 21,72,73, 74,75)
25
m
KeySeasr mo pseudo code piven) Tesi
GEPIN (76,77, 78, 79,0, 81)