You are on page 1of 60

Mc lc

Mc lc...........................................................................................................................................................................................................................................1
.........................................................................................................................................................................................................................................................5
U HI N TP K NGH PHN MM NNG CAO...........................................................................................................................................................6
1. Cht lng v m bo cht lng phn mm..........................................................................................................................................................................6
1.1. Khi nim v m bo cht lng..................................................................................................................................................................................6
Cu 1: Cht lng ca mt sn phm phn c sn xut l g? i vi phn mm nh ngha ny c ng khng? Lm th no p dng nh
ngha ..................................................................................................................................................................................................................................6
Cu2: Ci g c dng lm c s kim nh cht lng phn mm: ............................................................................................................................6
Cu 3: lm c s cho vic kim nh cht lng, c t cc yu cu phn mm cn tho mn cc iu kin g? Nu mt vi v d v iu kin
a ra......................................................................................................................................................................................................................................7
Cu 4: Cc nhn t nh hng ln cht lng phn mm c my mc ? Nhng loi nhn t no nh hng n cht lng?...................................7
Cu 5: Nu cc c trng nh hng ln cht lng ca mi loi nhn t: c trng chc nng, kh nng thch nghi vi thay i, kh nng thch
nghi vi mi trng................................................................................................................................................................................................................7
Cu 6: C th o trc tip cht lng phn mm khng? Ti sao? Vy phi o bng cch no?.....................................................................................11
Cu 7: K ra cc o c trng cht lng chnh ca McCall? Gii thch ni dung ca n?........................................................................................11
Cu 8: Gii thch ni dung cc thuc tnh cht lng phn mm sau y v nu ra cc o lin quan c s dng o thuc tnh :................12
Cu 9: Nu cc c trng cht lng theo Hawlett? Gii thch ni dung mi loi............................................................................................................14
1.2. Tin ha ca hot ng m bo cht lng .......................................................................................................................................................................15
Cu 10: m bo cht lng phn mm xut pht t u? Tin trin ca n nh th no...............................................................................................15
Cu 11:Ti sao cn m bo cht lng phn mm? N ng vai tr g trong mt doanh nghip pht trin phn mm?..............................................15
Cu 12: Khi no cn thc hin cc hot ng m bo cht lng phn mm:.................................................................................................................16
Cu 13: Trong mt t chc ai l ngi tham gia vo hot ng m bo cht lng? Vai tr v trch nhim ca mi i tng l g?..................16
Cu 14: Mc tiu ca SQA l g? Cc hot ng chnh m bo cht lng phn mm l nhng hot ng no?.........................................................16
Cu 15: Gii thch ni dung tm tt ca mi hot ng chnh m bo cht lng?.......................................................................................................16
1.3. R sot phn mm.................................................................................................................................................................................................................18
Cu 16: R sot phn mm c hiu l g (khi nim, mc tiu, cch thc p dng)? Nu cc li ch ca vic ra sot?..............................................18
Cu 17: Cc hnh thc ca hot ng r sot? trnh by khi nim, mc tiu ca r sot k thut chnh thc?...............................................................18
Cu 19: Trnh by ni dung c bn mt cuc hp r sot: thnh phn, thi gian, cng vic cn lm, phng chm , sn phm?..................................19
Cu 20 Cc sn phm ca cuc hp r sot l g? Ni dung, vai tr ca mi sn phm ?.............................................................................................21
Cu 21 Khi no tin hnh r sot? Cn r sot nhng sn phm g....................................................................................................................................21
Cu 22: Trnh by ni dung danh mc r sot ca?............................................................................................................................................................21
Trnh by nhng ni dung c bn (mc tiu, ni dung, danh mc) ca.............................................................................................................................22
1

2. Cc o c trng cht lng phn mm.............................................................................................................................................................................26


2.1. Cc o ch s cht lng chng trnh....................................................................................................................................................................26
23. Nu cc k hiu v gii thch cc o: s1,s2,s3,s4,s5,s6,s7 v D1=1&0, (D2=1-s2/s1), (D3=1-s3/s1), (D4=1-s5/s4), (D5=1-s6/s4), (D6=1s7/s1)?...................................................................................................................................................................................................................................27
24. S dng cng thc wiDi vi wi = 1 nh th no v lm g?............................................................................................................................27
25. Gii thch ni dung cc thnh phn v ngha o SMI =
v cch s dng n?...........................................................27
26.S o phc tp ca McCabeda trn ci g v nhng i lng c th no?..........................................................................................................29
- S o da trn phc tp chu trnh trong th chng trnh ca mt modun............................................................................................................29
+ S chu trnh c chu trnh lng nhau.................................................................................................................................................................................29
+ S chu trnh trong mt chu trnh......................................................................................................................................................................................29
- Ngi ta cng dng cc min phng ca th phng biu din th chng trnh...............................................................................................29
27.m bo cht lng phn mm da trn thng k ngha l g?N gm nhng cng vic g? K t nht nm nguyn nhn ca nhng khuyt im
trong phn mm?..................................................................................................................................................................................................................29
L bo m cht lng thng k phn nh mt xu th ngy cng tng trong cng nghip..............................................................................................29
Cng vic bao gm:..............................................................................................................................................................................................................29
- Thu thp v phn loi thng tin khim khuyt phn mm...............................................................................................................................................29
- C gng ln vt tm ra nguyn nhn............................................................................................................................................................................29
- Dng nguyn l Pare c lp 20% khim khuyt...............................................................................................................................................................29
- Sau khi tm c nguyn nhn s chnh sa cc nguyn nhn ca khim khuyt...........................................................................................................29
Cc nguyn nhn gy ra khim khuyt c th l:................................................................................................................................................................29
- c t khng y hoc sai st (IES)............................................................................................................................................................................29
- Hiu nhm khi giao tip vi khch hng (MCC)..............................................................................................................................................................29
- Lch hng d nh khi c t (IDS)...............................................................................................................................................................................29
- Vi phm cc chun lp trnh (VPS)..................................................................................................................................................................................29
- Sai trong biu din d liu (EDR)....................................................................................................................................................................................29
- Khng ph hp vi giao din modun (IMI).....................................................................................................................................................................29
- Sai trong logic thit k (EDL)..........................................................................................................................................................................................29
- Th nghim sai hoc khng y (IET). . ...................................................................................................................................................................29
28. Nu cng thc khim khuyt ca mt sn phm mt pha pht trin? v cng thc tnh khim khuyt ca sn phm cui cng? Gii thch
ngha ca n?........................................................................................................................................................................................................................29
- Ngi pht trin cn phi tnh ch s khim khuyt cho mi bc chnh pht trin phn mm.....................................................................................29
- Cc thng tin tnh mc khim khuyt.....................................................................................................................................................................29
+ Di= tng s cc khim khuyt........................................................................................................................................................................................29
+ Si= s cc khim khuyt nghim trng..........................................................................................................................................................................29
2

+ Mi= S cc khim khuyt va phi................................................................................................................................................................................29


+ Ti =s cc khim khuyt nh..........................................................................................................................................................................................29
- Vi mi bc chnh trong pht trin phn mm cn tnh ch s pha PIi:.........................................................................................................................29
PIi=w1(Si/Di) + w2(Mi/Di) + w3(Ti/Di)..........................................................................................................................................................................29
Trong w1, w2, w3 l trng s tng ng vi cc khim khuyt nghim trng, va phi v nh................................................................................29
Trng s ny c lng mc thit hi m loi mang li...............................................................................................................................................29
- Ch s khim khuyt DI c tnh nh sau:....................................................................................................................................................................30
DI= (PI1 + 2PI2 +. . .+iPIi)/PS.........................................................................................................................................................................................30
Trong PS l kch c ca sn phm (l LOC = s dng m, hoc s tuyn b thit k, hoc s trang ti liu) tu theo tng bc...........................30
Theo cng thc: cc khim khuyt cng v sau cng v sau cng nhn vi h s ln.....................................................................................................30
29. Tip cn hnh thc cho SQA ngha l g? Qu trnh phng sch l g? Phng chm ca k thut ny l g?...........................................................30
Ngi ta nhn thy cn phi dng mt cch tip cn hnh thc hn trong vic bo m cht lng phn mm, cch tip cn ny s b sung cho cc
hot ng m t trn.........................................................................................................................................................................................................30
Tip cn hnh thc ho: c t hnh thc cho php chng minh tnh ng n, kim tra li, chuyn t ng thnh chng trnh . . . lm tng cht
lng.....................................................................................................................................................................................................................................30
- Kim chng chng trnh mt cch hnh thc (chng minh tnh ng n) v bo m cht lng phn mm thng k hp li vi nhau cho ta ta
mt k thut ci thin cht lng sn phm, c gi l qu trnh phng sch................................................................................................................30
- Phng chm ca k thut ny l: Phng khim khuyt hn l tr khim khuyt ........................................................................................................30
2.2. Cc o v s tin cy v an ton...............................................................................................................................................................................30
31. Th no l tht bi ca phn mm? C my thang bc? l nhng thang bc no?......................................................................................................30
32. Nu ch tiu tnh tin cy? Nu cng thc tnh sn sng? Gii thch ngha ca n?...................................................................................30
33. C nhng m hnh tin cy no? N da trn tham bin no v trn gi thit no? M hnh tin cy gieo ht da trn tng no? Mc tiu
lm g...............................................................................................................................................................................................................................31
34 an ton phn mm l ci g?C nhng phng php no phn tch an ton?................................................................................................32
35. Kho st nhu cu SQA gm nhng ni dung g? nhm tr li cc cu hi g?nu c nhu cu th mnh lm g?........................................................32
36. C nhng vn g t ra khi trin khai SQA? Li chca SQA l g? Nguyn tc chi ph hiu qu ca SQA l g?..............................................33
3. Kim th phn mm.............................................................................................................................................................................................................33
3.1. Khi nim v kim th..................................................................................................................................................................................................33
37. Ti sao phi kim th phn mm? Mc tiu kim th l g? T c quan nim gi sai v kim th phn mm?................................................33
38. Th no l mt ca kim th tt? ca kim th thnh cng? Li ch ph kim th l g................................................................................................34
39. Biu dng thng tin kim th m t ci g? v biu ca n?.............................................................................................................................34
40. K cc i tng v phng php kim th phn mm? Mi phng php thng c s dng vo giai an no ca qu trnh pht trin? 35
41. Mt ca kim th l ci g? Mc tiu thit k ca kim th? cc bc xy dng mt ca kim th?........................................................................36
42. Kim th hp trng l ci g? N nhm kim tra nhng ni dung no?......................................................................................................................36
3

43. Kim th hp en l ci g? N gip kim tra nhng ni dung no ca i tng kim th?...................................................................................36
44. Chin lc kim th phn mm l ci g? Nu cc nguyn tc trong chin lc kim th phn mm?.....................................................................36
45. Nu cc bc ca chin lc kim th thi gian thc v gii thch ni dung ca mi bc......................................................................................37
46. C nhng loi cng c t ng no tr gip kim th, m t ni dung ca mi loi..................................................................................................37
47. Ai l ngi phi tham gia kim th phn mm? Nu vai tr v trch nhim ca mi i tng?..............................................................................38
3.2. Cc phng php kim th...................................................................................................................................................................................................39
a. Kim th hp trng ..........................................................................................................................................................................................................39
48. Kim th hp trng da trn c s no thit k ca kim th? Thit k ca kim th phi m bo iu kin g?................................................39
49. th dng gm nhng yu t no? Xy dng n da vo u? N c c trng g, th dng dng lm g?...............................................39
50. Con ng c bn trong th dng l ci g? phc tp ca chu trnh l g? Nu cc cng thc tnh phc tp? .........................................39
51. Ma trn th nghim c cu trc nh th no? N c dng lm g?..............................................................................................................41
52 Nu cc loi iu khin trong cu trc iu khin v cho v d? C nhng loi sai no trong iu kin khi kim th..............................................41
53. Chin lc kim th phn nhnh ngha l g? Yu cu t ra cho kim th phn nhnh l g?.................................................................................41
54. Chin lc kim th min l ci g? N da trn t tng no?.................................................................................................................................42
55. Chin lc kim th BRO l ci g? N da trn t tng no?.................................................................................................................................42
57. Kim th iu khin dng d liu ngha l g? Cho v d?.........................................................................................................................................42
58. Kim th iu khin vng lp ngha l g? Cho v d?.................................................................................................................................................44
59. M hnh ca kim th hp en quan tm n nhng nhn t no ca phn mm? N nhm tm ra cc loi sai no? Nu cc phng php p
dng cho n?........................................................................................................................................................................................................................45
60. Trnh by phng php phn hoach: nguyn tc, mc tiu v thit k ca kim th? Phng chm xc nh lp tng ng l gi?.....................45
61. Phn tch gi tr bin ngha l g? Phng chm phn tch gi tr bin l g?............................................................................................................46
62. K thut nhn qu ngha l g? Nu cc bc ca k thut ?.................................................................................................................................46
63. Chin lc kim th thi gian thc gm my bc? l nhng bc no? Gii thch ni dung c bn mi bc? .................................................46
64. Kim th n v l g? Quan h ca n vi hot ng m ha nh th no?..............................................................................................................47
65. Ni dung c th ca hot ng kim th n v lin quan n nhng vn g (tham s, vo ra, d liu cc b, th tc tnh ton, cc dng iu
khin)?..................................................................................................................................................................................................................................47
66. K thut kim th n v s dng l g? v sao phi s dng k thut ? C nhng kh khn thun li g?..........................................................49
67. Kim th tch hp thc hin khi no? Ti sao phi kim th tch hp?.......................................................................................................................49
68. C nhng phng php g c p dng cho kim th tch hp? m t tm tt ni dung mi phng php?.........................................................49
69. Nu cc bc kim th tch hp t trn xung? u nhc im ca cch tip cn ny?..........................................................................................50
70. Nu cc bc kim th tch hp t di ln? u nhc im ca cch tip cn ny?..............................................................................................50
71. Cc ti liu kim th tch hp gm nhng loi g?......................................................................................................................................................50
72. Kim th Beta l ci g? Kim th Alpha l ci g? Gia chng khc nhau c bn ch no ?...............................................................................51
73. Ni dung chnh ca kim th h thng ? Nu mt s cu hi t ra cho kim th h thng ?..................................................................................52
4

74 Kim th phc hi l g ?..............................................................................................................................................................................................52


75. Kim th an ninh l g ?...............................................................................................................................................................................................53
76. Kim th p lc l g.....................................................................................................................................................................................................53
77. Kim th thi hnh l g?...............................................................................................................................................................................................54
78. G ri c hiu l g ? N thc hin khi no ? Kh khn ca vic g ri l g ?.....................................................................................................54
79. Trnh by tin trnh g ri ? Cch thc g ri ? u nhc im ca chng................................................................................................................55
80. Qun l cu hnh phn mm l ci g? Ni dung ca hot ng qun l cu hnh gm nhng cng vic g?............................................................56
81. Cu hnh phn mm l ci g? Ni dung cc khon mc chnh trong cu hnh phn mm gm nhng g?................................................................57
82. Qun l cu hnh nhm mc tiu g?Nm nhim v ca qun l cu hnh l g.........................................................................................................58
83. Phng php g c p dng cho vic qun l cu hnh? Mc gii l ci g? S dng mc gii kim sot s thay i nh th no?............58
84. Trnh by tin trnh kim sot s thay i? .................................................................................................................................................................58
85. Phin bn l ci g? Lm th no kim sot cc phin bn.....................................................................................................................................59
86.Kim ton cu hnh phn mm ngha l g? Hot ng kim ton cn tr li nhng cu hi g?................................................................................59
11. Bo co hin trng ngha l g? N cn tr li c nhng cu hi g? u ra ca bo co hin trang dnh cho ai? mc tiu ca n l g?...........60

U HI N TP K NGH PHN MM NNG CAO


1. Cht lng v m bo cht lng phn mm
1.1. Khi nim v m bo cht lng
Cu 1: Cht lng ca mt sn phm phn c sn xut l g? i vi phn mm
nh ngha ny c ng khng? Lm th no p dng nh ngha
- Cht lng ca sn phm c th hin bng cc c trng ph hp vi cc c t ca
n.
- nh ngha ny l chung cho mi sn phm. Vi phn mm c mt s vn :
Phn mm c yu cu m cha c c t
Phn mm c c t nhng li m m
C nhng yu cu t nhin nn khng c c t
- Cht lng phn mm l:
- vic tun th cc yu cu chc nng v s hon thin c pht biu tng minh
- cc chun pht trin c t liu ho tng minh
- cc c trng khng tng minh c trng i t tt c cc phn mm c pht
trin theo cch chuyn nghip:
Theo quan im ca ngi pht trin th mt phn mm tt l mt phn mm t li.
chnh l cht lng ca chng trnh. Vn l lm th no chng trnh chy
ging nh thit k. Cht lng ca phn mm theo quan im ny chnh l quan im cht
lng theo kiu lp trnh. Ngui ta cng gi cht lung ny l cht lng theo ngha cn
thit v n phn nh ci bt buc phi lm c tnh nguyn tc mc d ni chung ngui ta
khng t c.
c mt s thay i ln trong cch quan nim cht lng ca phn mm. Theo
quan im ca khch hng, phn mm tt l phn mm p ng tt yu cu ca khch
hng v d dng, d bo tr. l cht lng theo quan im thit k. Vn l lm th
no thit k p ng ng nhu cu ca ngi s dng. Ngi ta cng ni l cht
lng theo ngha hp dn v n hng ti ngi dng.
Cn mt kha cnh mi trong quan nim cht lng ca phn mm l tin cy,
c hiu l tnh chnh xc, tnh n nh, tnh an ton ca phn mm. K t khi my tnh
tr thnh h tng mi ca x hi, tin cy ca phn mm tr nn ht sc quan trng i
vi cc hot ng x hi. y l cht lng theo ngha x hi o mc nh hng ca
sn phm ti mi ngi (khng k chnh ngi pht trin v NSD trc tip).
Mt phn mm tt khng nhng phi p ng nhu cu ca ngi pht trin m phi
tho mn ngi s dng v c tin cy cao. Vy c th nh ngha: Cht lng l mc
tho mn ca NSD i vi sn phm hay dch v .
Cu2: Ci g c dng lm c s kim nh cht lng phn mm:
nh gi cht lng phn mm ngi ta da vo quan im chnh sau:
Yu cu phn mm l c s o cht lng:
6

S ph hp vi yu cu l c cht lng
Ph hp yu cu c v s lng v cht lng

Yu cu th hin bng c t - c t phi c chun ca n mi kim tra c


Cc chun c t xc nh mt b cc tiu chun pht trin, cc tiu chun ny hng

dn cch thc lm ra phn mm: nu khng tun th cc tiu chun th hu nh chc


chn l cht lng s km
Lun c mt tp cc yu cu ngm thng t c nhc n
Qu thng dng, hin nhin (s dng ca s)
Khng th hin ra ngoi (quy tc nghip v)
Nu phn mm ch ph hp vi cc yu cu hin th m cha ph hp vi yu cu
ngm th cht lng phn mm l ng nghi ng
Cn lm r yu cu v a vo c t cng nhiu cng tt
Cu 3: lm c s cho vic kim nh cht lng, c t cc yu cu phn mm cn
tho mn cc iu kin g? Nu mt vi v d v iu kin a ra.
Yu cu phn mm l c s o cht lng. Yu cu th hin ra bng c t v c
t phi c chun ca n mi kim tra c. Cc chun c t xc nh mt b cc tiu
chun pht trin, cc tiu chun ny hng dn cch thc lm ra phn mm: nu khng
tun th cc tiu chun th hu chc chn l cht lng s thiu st.
Cu 4: Cc nhn t nh hng ln cht lng phn mm c my mc ? Nhng loi
nhn t no nh hng n cht lng?
- C 2 loi mc nh hng
Nhn t trc tip
Nhn t gin tip
- C 3 loi nhn t nh hng n cht lng
c trng chc nng
Kh nng ng u vi nhng thay i
kh nng thch nghi vi mi trng mi.

Cu 5: Nu cc c trng nh hng ln cht lng ca mi loi nhn t: c trng


chc nng, kh nng thch nghi vi thay i, kh nng thch nghi vi mi
trng
McCall xut 11 nhn t v phn thnh 3 loi:
(1) c trng chc nng
(2) kh nng ng u vi nhng thay i
7

(3) kh nng thch nghi vi mi trng mi.


Loi 1: Cc c trng chc nng - (5)
Tnh ng n
- C lm ng vi ci ti mun hay khng?
- C tha mn nhng iu c c t cha?
- C thc hin c nhng mc tiu nhim v ca khch hng cha?
o y
o

ha hp

ln vt c

Tnh tin tng c

- mc hy vng vo s thc hin cc chc nng d kin


- mc chnh xc c i hi
o chnh xc
o

phc tp

ha hp

dung th li

o moun ho

n gin d hiu.

ln vt c

Tnh hiu qu: khi lng ti nguyn tnh ton v m c i hi khi thc hin

cc chc nng ca chng trnh


o sc tch
o

hiu qu thc hin

d thao tc

Tnh ton vn: c th khng ch c vic truy cp ca nhng ngi khng c


php ti phn mm v d liu
o kim ton c
o

Trang b ngh

an ninh.

Tnh kh dng: o cng sc hc hiu, thao tc, chun b u vo, th hin u ra


ca chng trnh
o d thao tc
o

o kh nng hun luyn

Loi 2: kh nng ng u vi nhng thay i - (3)


Tnh bo tr c: n lc i hi nh v v xc nh c mt sai trong

chng trnh
o sc tch
8

ho hp

Trang b ngh

o moun ho

t cp ti liu

n gin - d hiu

Tnh mm do: n lc i hi ci bin mt chng trnh


o

phc tp

sc tch

ho hp

khuch trng c

khi qut

o moun ho

t cp ti liu

n gin - d hiu

Tnh th nghim c: n lc i hi th nghim mt chng trnh v bo m

rng n thc hin chc nng c d nh cho n


o kim ton c
o

phc tp

Trang b ngh

o moun ho

t cp ti liu

n gin - d hiu

Loi 3: kh nng thch nghi vi mi trng mi - (3)


Tnh mang chuyn c: n lc i hi chuyn n t mt mi trng phn

cng/phn mm ny sang mt mi trng phn cng/phn mm khc


o khi qut
o

c lp phn cng

o moun ho

t cp ti liu

c lp h thng phn mm

Tnh s dng li c: mt chng trnh (hoc mt phn ca n) c th c dng


li trong mt ng dng khc
o khi qut
o

c lp phn cng

o moun ho

t to ti liu

c lp h thng phn mm
9

Tnh lin tc c: n lc i hi ghp i mt h thng vo mt h thng


khc
o tng ng giao tip
o

tng ng d liu

khi qut

o moun ho.

C hai mc nh hng
Nhn t trc tip: c th thc tip o nh li/KLOC/ n v thi gian
Nhn t gin tip: nhn t ch c th o c mt cch gin tip nh tnh bo tr
Nhn t
o
Kim ton c
Chnh xc
Tng ng giao tip
y
Phc tp
Sc tch
Ha hp
Tng ng d liu
Dung th li
Hiu qu thc hin
Khuych trng c
c lp phn cng
Trang b ngh
o Modul ha
D thao tc
An ninh
T to ti liu
n gin - D hiu
c lp h thng phn
mm
Ln vt c
Kh nng hun luyn
Khi qut

ng
n

Tin cy
c

Hiu
qu

Ton
vn
X

Kh
dng

Bo tr
c

Mm
do

Th nghim
c
x

x
x
x

x
x

x
X
x
x
X

x
x
x

x
X
x
x

x
x

x
x

x
x

x
x

x
x

x
X

x
X

x
x
x

10

Cu 6: C th o trc tip cht lng phn mm khng? Ti sao? Vy phi o bng


cch no?

Nhn t trc tip: c th trc tip o nh li/KLOC/ n v thi gian

Cu 7: K ra cc o c trng cht lng chnh ca McCall? Gii thch ni dung


ca n?
McCall xut 22 o sau:
(1) kim ton c: c th kim tra d dng v vic tun th cc chun
(2) chnh xc: chnh xc ca tnh ton v iu khin
(3) tng ng giao tip: mc s dng cc giao din, giao thc v gii thng
chun.
(4) y : mc theo cc vic ci t y cho cc chc nng yu cu
c t ti.
(5) phc tp: trnh dng chng trnh c phc tp cao
(6) sc tch (conciseness): gn ca chng trnh di dng s dng m.
(7) ho hp (consistancy): vic dng k thut thit k v t liu thng nht trong
ton b chng trnh.
(8) tng ng d liu: vic dng cc cu trc v kiu d liu chun trong ton b
chng trnh
(9) dung th li: nhng hng hc xut hin khi chng trnh gp phi mt li c
chp nhn.
(10) hiu qa thc hin: hiu nng khi chy ca chng trnh
(11) khuch trng c:Mc theo thit k kin trc, d liu hay th tc c
th c m rng.
(12) khi qut: rng ri ca ng dng tim nng ca cc thnh phn chng trnh.
(13) c lp phn cng: mc theo phn mm tch bit c vi phn cng
m n vn hnh.
(14) Trang b ngh (instrumentation):mc theo chng trnh iu phi thao
tc ca ring n v xc nh cc li xut hin
(15) o moun ho: s c lp chc nng ca cc thnh phn trong chng trnh
(16) d thao tc: Vic d vn hnh trong chng trnh
(17) an ninh: c sn c ch kin sot hay bo v chng trnh v d liu.
(18) t to ti liu (self-doccumentation): mc theo m gc cung cp ti liu
c ngha.
(19) n gin - d hiu: mc theo ngi ta c th hiu c chng trnh
khng kh khn.
(20) c lp h thng phn mm: mc theo chng trnh c c lp vi cc
tnh nng ngn ng lp trnh, cc c trng h iu hnh v nhng rng buc mi
trng khng chun khc.
11

(21)
(22)

ln vt c: kh nng theo di cc du vt ca mt biu din thit k hay thnh


phn ca chng trnh thc hin so vi yu cu
o kh nng hun luyn: Mc theo phn mm tr gip lm cho ngi
dng mi dng c h thng.

Cu 8: Gii thch ni dung cc thuc tnh cht lng phn mm sau y v nu ra cc


o lin quan c s dng o thuc tnh :
Tnh ng n
- Lm ng vi khch hng mong mun
- C tha mn nhng iu c c t (nhng yu cu ca i tng khc)
o

ha hp

ln vt c

Tnh tin cy c
- C th trng i vo s thc hin cc chc nng d kin

- mc chnh xc c i hi
o chnh xc
o

phc tp

ha hp

dung th li

o moun ho

n gin d hiu.

ln vt c

Tnh hiu qu: tng lng ngun lc tnh ton v m yu cu khi thc hin cc

chc nng ca chng trnh l thch hp


o sc tch
o

hiu qu thc hin

d thao tc

Tnh ton vn: l s khng ch c vic truy cp tri php ti phn mm v d

liu h thng
o kim ton c
o

Trang b ngh

an ninh.

Tnh kh dng: cng sc hc hiu, thao tc, chun b u vo, th hin u ra

ca chng trnh l chp nhn nhn c


o d thao tc
o

o kh nng hun luyn

12

Tnh bo tr c: n lc cn nh v v xc nh c mt li trong chng

trnh l chp nhn c


o sc tch
o

ho hp

Trang b ngh

o moun ho

t cp ti liu

n gin - d hiu

Tnh mm do: n lc cn ci bin mt chng trnh l chp nhn c


o

phc tp

sc tch

ho hp

khuch trng c

khi qut

o moun ho

t cp ti liu

n gin - d hiu

Tnh th nghim c: n lc cn th nghim mt chng trnh v bo m

rng n thc hin ng chc nng d nh l chp nhn c


o kim ton c
o

phc tp

Trang b ngh

o moun ho

t cp ti liu

n gin - d hiu

Tnh mang chuyn c: n lc i hi chuyn n t mt mi trng phn

cng/phn mm ny sang mt mi trng phn cng/phn mm khc l chp nhn


c
o khi qut
o

c lp phn cng

o moun ho

t cp ti liu

c lp h thng phn mm

Tnh s dng li c: kh nng chng trnh (hoc mt phn ca n) c th c

dng li trong mt ng dng khc


o khi qut
o

c lp phn cng

o moun ho
13

t to ti liu

c lp h thng phn mm

Tnh lin tc c: n lc i hi ghp h thng chng trnh vo mt h thng

khc l chp nhn c


o tng ng giao tip
o

tng ng d liu

khi qut

o moun ho.

Cu 9: Nu cc c trng cht lng theo Hawlett? Gii thch ni dung mi loi


Cc c trng cht lng
- Nhn t chc nng
c tnh bng tp hp cc tnh cht v kh nng ca chng trnh , khi qut
cc chc nng c thc hin v an ninh ca ton h thng
- Nhn t kh dng
c nh gi bng vic xt cc nhn t con ngi, thm m, s ho hp v t liu
cung cp
- Nhn t tin cy
c nh gi bng:
+ tn xut tht bi v nghim trng ca n
+ Tnh chnh xc ca cc kt qu ra
+ Thi gian trung bnh gia hai tht bi k nhau
+ Kh nng phc hi sau tht bi
+ Kh nng on trc c tht bi ca chng trnh
- Nhn t thi hnh
c nh gi bng
+ Tc x l
+ Thi gian p ng
+ s dng ngun lc
+ Nng sut v hiu nng
- Nhn t mang chuyn
nh gi bng t hp cc kh nng:
+ M rng chng trnh
+ thch nghi
+ Phc v c (bo tr c)
+ Th nghim c
+ S tng hp

14

+ Cu hnh c (kh nng t chc v khng ch cc yu t ca cu hnh phn


mm, d dng ci t h thng v d dng nh v cc ch c vn )

1.2. Tin ha ca hot ng m bo cht lng


Cu 10: m bo cht lng phn mm xut pht t u? Tin trin ca n nh th
no
- Khi phn mm tr thnh sn phm c nhu cu v i hi m bo cht lng:
T nhu cu ca khch hng
T nh sn xut: m bo tnh ng u ca sn phm, ci thin cht lng thng

xuyn
- S pht trin ca SQA
Bo m cht lng l mt hot ng ct yu trong bt k mt doanh nghip no
lm ra sn phm c ngi khc dng
Lch s bo m cht lng phn mm (SQA) din ra song song vi bo m cht
lng trong ch to phn cng.
Cc chun bo m cht lng phn mm u tin c a ra trong qun s, thi
nhng nm 70 v nhanh chng lan ra lnh vc thng mi
Cu 11:Ti sao cn m bo cht lng phn mm? N ng vai tr g trong mt
doanh nghip pht trin phn mm?
m bo cht lng phn mm l cc hot ng nhm mc tiu l sn xut ra phn mm
c cht lng cao.
Phi m bo cht lng phn mm v
T nhu cu ca khch hng
T nh sn xut: m bo tnh ng u ca sn phm lm ra
Gip nh phn tch c c c t cht lng cao
Gip nh thit k c c thit k cht lng cao
Theo di cht lng phn mm
nh gi nh hng ca thay i v phng php lun v th tc ln cht lng
phn mm
SQA c nhng li ch sau:
-

phn mm c t cc khim khuyt tim n hn v do mt t cng sc v thi


gian th nghim v bo tr
tin cy cao hn v do khch hng tho mn hn
Gim ph tn bo tr
Gim ph tn tng th ton b vng i ca phn mm

n ng vai tr trong mt doanh nghip pht trin phn mm


15

Bo m cht lng l mt hot ng ct yu trong bt k mt doanh nghip no


lm ra sn phm c ngi khc dng
Cu 12: Khi no cn thc hin cc hot ng m bo cht lng phn mm:
Cht lng phn mm c thit k bn trong sn phm hay h thng do n c bt
u ngay t khi phn tch v n gip ngi phn tch t ti c t cht lng cao v ngi
thit k th pht trin thit k vi cht lng cao.
Cu 13: Trong mt t chc ai l ngi tham gia vo hot ng m bo cht lng?
Vai tr v trch nhim ca mi i tng l g?
Nhng ngi trong t chc c trch nhim bo m cht lng phn mm:
- cc k s phn mm,
- cc nh qun l d n,
- khch hng,
- ngi bn hng,
- cc c nhn trong nhm SQA.
Nhm SQA ng vai tr nh i din ca khch hng - xem cht lng phn
mm vi quan im khch hng
C p ng c cc nhn t cht lng khng?
C tun theo cc chun d nh trc khng?
Cc th tc phng php k thut c thc s ng vai tr ca chng trong
hot ng SQA?
Cu 14: Mc tiu ca SQA l g? Cc hot ng chnh m bo cht lng phn mm
l nhng hot ng no?
m bo cht lng phn mm l cc hot ng nhm mc tiu l sn xut ra phn mm
c cht lng cao.
C 7 hot ng chnh:
1. p dng cc phng php k thut tin b
2. Tin hnh r sot k thut chnh thc
3. Th nghim phn mm
4. Tun theo cc chun
5. Khng ch cc thay i
6. o lng
7. Bo co v bo qun cc bo co.

Cu 15: Gii thch ni dung tm tt ca mi hot ng chnh m bo cht lng?


1. p dng cc phng php k thut: gip cho
- ngi phn tch c c c t cht lng cao
- ngi thit k c c thit k vi cht lng cao.
16

2. Tin hnh r sot k thut chnh thc: c nhm k thut tin hnh vi mc ch l
pht hin ra vn cht lng.
3. Kim th phn mm: l mt chin lc nhiu bc vi mt lot cc phng php
thit k cc trng hp kim th gip m bo pht hin ra cc li mt cch hiu
qu.
4. Bt tun theo cc chun: L hnh thc c p dng cho tin trnh k ngh phn mm
thay i tu theo cng ty.
5. Khng ch cc thay i: ng gp trc tip vo cht lng phn mm nh
+ Chnh thc ho cc yu cu i thay
+ nh gi bn cht ca s i thay
+ Khng ch cc nh hng ca s i thay
+ e do ch yu ca cht lng n t s thay i, thay i l bn cht ca
phn mm
+ thay i to ra tim nng sinh ra sai v to ra hiu ng ph lan truyn
p dng trong sut qu trnh pht trin v trong qu trnh bo tr
6. o lng: dng theo di cht lng phn mm v thm nh tc dng ca nhng
thay i phng php lun v th tc ln cht lng phn mm c ci tin.
7. Bo co v bo qun cc bo co: Kt qu ca cc cuc hp xt duyt , kim ton,
kim sot thay i, kim th phi tr thnh mt phn ca bn ghi lch s cho mt d
n v phi c phn pht cho nhm pht trin trn c s iu-cn - phi- bit.

17

1.3. R sot phn mm


Cu 16: R sot phn mm c hiu l g (khi nim, mc tiu, cch thc p dng)?
Nu cc li ch ca vic ra sot?
Khi nim: R sot l vic xem xt, nh gi sn phm c tin hnh mi giai on
pht hin ra nhng khim khuyt cn sa cha trc khi sang giai on sau.
Mc tiu:
Ch ra cc ch khim khuyt cn phi ci thin
Khng nh nhng sn phm t yu cu
Kim sot vic t cht lng k thut ti thiu ca sn phm
Cch thc p dng: R sot c p dng ti cc thi im khc nhau trong qu trnh
pht trin phm mm.
C nhiu kiu r sot khc nhau:

Cc cuc hp xt duyt khng chnh thc


Cuc trnh by chnh thc trc c ta gm khch hng, nh qun l, nhn vin k

thut. (ch tp trung vo cc r sot k thut chnh thc FTR-Format Technical


Review)
Cc li ch ca vic ra sot

Li ch hin nhin ca FTR l sm pht hin cc khim khuyt phn mm c


th chnh sa tng khim khuyt mt trc khi bc sang bc tip theo ca qu
trnh phn mm.
Cc nghin cu ca cng nghip phn mm ch ra rng: cc hot ng thit k
to ra n 50%-60% tng s cc khim khuyt to ra trong pht trin phn mm.
Chi ph chnh sa mt khim khuyt tng ln nhanh chng sau mi giai on. VD:
Li khng c pht hin trong thit k tn ph 1.0 sa cha, trc kim th
nghim: 6.5; trong th nghim: 15 v sau khi phn pht s l t 60.0 n 100.0
Cu 17: Cc hnh thc ca hot ng r sot? trnh by khi nim, mc tiu ca r sot
k thut chnh thc?
C nhiu kiu r sot khc nhau:
Cc cuc hp xt duyt khng chnh thc
Cuc trnh by chnh thc trc khch hng, nh qun l, thnh vin k thut
R sot do cc k s phn mm thc hin, l mt phng tin hiu qu ci thin cht
lng phn mm.
R sot k thut chnh thc(FTR):
- Khi nim: l hot ng m bo cht lng phn mm do nhng ngi ang
tham gia pht trin phn mm thc hin.
- Mc tiu:
18

Pht hin cc li trong chc nng, trong logic, trong trin khai.
(2) Kim th s ph hp ca phn mm vi yu cu
(3) Bo m rng phn mm ph hp vi cc chun nh sn
(4) m bo phn mm c pht trin theo mt cch thc nht qun.
(5) Lm cho d n d qun l hn
(6) Ngoi ra dng lm c s hun luyn cc k s tr v c ch ngay c
cho nhng k s c kinh nghim.
(1)

Cu 18: V s tin trnh hot ng r sot va gii thch s b ni dung mi bc?

Gii thch:
-

Mi c nhn pht trin phi thng bo cho lnh o d n bit rng sn phm
hon tt v cn phi r sot.
Lnh o d n thng bo cho ngi chu trch nhim r sot bit
Ngi chu trch nhim lnh o r sot:
o Xem xt sn phm c, r sot
o To ra cc bn sao ca sn phm , phn cho 2,3 ngi ra sot
o Thit lp chng trnh hp r sot

Nhng thc hin r sot: thng tn 1-2 gi r sot vit cc bn ghi ch :


tham gia cuc hp r sot.

Cu 19: Trnh by ni dung c bn mt cuc hp r sot: thnh phn, thi gian, cng
vic cn lm, phng chm , sn phm?
Bt k th no, mi cuc hp r sot phi:
Thnh phn: C t 3 n 5 ngi lin quan ti vic r sot, gm c:
lnh o r sot
tt c cc c nhn r sot
ngi to ra sn phm c r sot
Thi gian:
19

Phi c s chun b trc, tuy nhin mi ngi khng qu 2 gi chun b.


Cuc hp nn t hn 2 gi. Mi cuc hp r sot ch hn ch trong mt phn nh, c
th.
Cng vic cn lm:
Trng tm ca cc cuc hp r sot l v sn phm: mt thnh phn (mt thnh
phn ca c t yu cu, mt thit k modul chi tit, mt danh sch m ngun cho
mt modul)
Phi a ra mt trong 3 quyt nh sau y:
- Chp nhn sn phm khng cn chnh sa
- Khc t sn phm v nhng li nghim trng
- Chp nhn cho chnh sa sn phm, sau khi chnh sa phi c cuc hp r sot
li
Mi thnh vin tham gia cuc hp phi k vo quyt nh
Phng chm r sot:
Cn thit lp trc phng chm r sot, phn pht cho nhng ngi lm nhim v
r sot, thng nht tn thnh v tun th. Mt r sot m khng khng ch c th
c th cn xu hn l khng r sot
10 iu ti thiu trong phng chm r sot k thut chnh thc:
(1)
(2)
(3)

(4)

(5)
(6)
(7)

(8)

(9)
(10)

r sot sn phm, khng r sot ngi lm n


Lp chng trnh ngh s v duy tr n.
Hn ch tranh lun v bc b: cc vn tranh lun nn ghi nh cho cc tho
lun tip tc
Trnh by r rng mch lc cc vng c vn nhng khng c gng p
gii quyt mi vn nhn thy: FTR khng gii quyt vn , vic gii quyt
vn sau FTR v thng do chnh ngi lm ra sn phm thc hin, c th
nh s tr gip ca vi c nhn khc.
Nn c ghi ch trn bng tng
Gii hn s ngi tham d v kin tr cc d kin
Lp mt danh sch cc kim tra cho tng sn phm s c r sot:
Gip nh lnh o r sot cu trc cc cuc hp FTR
Gip ngi r sot tp trung vo cc vn quan trng
Danh sch kim tra lp cho tng loi sn phm:nh cho vic phn tch, thit
k, m ho kim tra v bo tr
Mt tp th cc i din s xem li danh sch ny trnh.
Cp pht ngun lc v thi biu cho cc FTR: xem n l mt nhim v trong
qu trnh pht trin phn mm, v cng phi d tnh cc ci bin cn thit cho
s kin cha d on c
Cn phi tin hnh hun luyn chnh thc cho cc c nhn ra sot
R sot li cc r sot trc y.
20

Cu 20 Cc sn phm ca cuc hp r sot l g? Ni dung, vai tr ca mi sn phm


?
Sn phm ca cuc hp r sot l:
Bo co cc vn ny sinh do cc c nhn r sot nu ra
Mt danh sch cc vn cn gii quyt do cuc hp thng nht.
nhn ra vng c vn trong sn phm c r sot
dng nh mt danh sch cc khon mc hnh ng ch cho ngi lm ra
sn phm cn chnh sa
Cn thit lp mt th tc bo m rng cc khon mc trong danh sch
s c chnh sa thc s
Mt vn bn tng kt cuc hp r sot , vn bn ny phi ch r

R sot ci g
Ai r sot
Tm thy ci g? v kt lun

Cu 21 Khi no tin hnh r sot? Cn r sot nhng sn phm g


-

Mi sn phm to ra mi bc u c r sot (khng ch sn phm cui


cng)

R sot c tin hnh sut qu trnh pht trin

Tin trnh pht trin chung nht gm 4-5 giai on:

K ngh h thng

Phn tch, xc nh yu cu phn mm

Thit k phn mm

Kim th phn mm

Bo tr (vi sn phm t hng)

R sot bm theo cc sn phm ca r sot ny


Cu 22: Trnh by ni dung danh mc r sot ca?
Danh mc r sot trong k ngh h thng:
Bo m cht lng mc ny l nh gi yu cu thm duyt mc h thng: Mt cuc
hp ln gm i din cc n v lin quan
(1) Cc chc nng ch yu c xc nh v r rng(khng m h)?
(2) Cc giao din gia cc h con ca h thng c xc nh v ng hay cha?
(3) Cc rng buc thc thi c thit lp cho ton h thng v cho tng phn t hay
cha?
21

Cc rng buc thit k c thit lp cho tng phn t hay cha?


(5) kh nng chn l tt nht cha?
(6) Gii php ny c kh thi k thut khng?
(7) C ch kim chng v thm duyt wc thit lp hay cha?
(8) C s ho hp gia cc phn t ca h thng hay cha?
(4)

R sot vic lp k hoch


Lp k hoch d n phn mm da trn sn phm ca k ngh h thng a ra cc ni
dung ch yu:
+ Phm vi cng vic kim tra thc hin
+ c lng ngun lc, gi c, thi gian cng vic
+ Lch biu thc hin
+ T chc, nhn s, c ch trin khai
+ nh gi ri ro v k hoch khc
Danh mc
(1) Phm vi ca phn mm xc nh ng n cha? c b hn ch hay khng?
(2) Thut ng c trong sng khng?
(3) Cc ngun lc (ngi, chi ph, thi gian): c tng xng vi phm vi khng?
Cc ngun lc c sn sng cha?c s d on gi c c hp l khng? d liu
nng xut v cht lng trc y c c s dng khng? S khc bit ca c
lng c s l cha?
(4) Cc cng vic ln lch biu : xc nh thch hp cha? Sp xp trnh t thc hin
ng logic cha? b tr song song c ph hp vi cc ngun lc sn c hay
khng?
(5) Phng n t chc v nhn s hp l cha?
(6) Cc ri ro trong tt c cc hng mc quan trng : xc nh v nh gi y
cha? Lp k hoch qun l v k hoch thch hp cha?
(7) Cc nhim v tht s c xc nh v sp xp tun t cha?, tnh song song c
hp l i vi cc ngun lc sn c hay cha?
(8) Ngn sch v gii hn cht c d kin: c hin thc hay khng? c ph hp vi
lch biu khng?
Trnh by nhng ni dung c bn (mc tiu, ni dung, danh mc) ca
- r sot phn tch yu cu phn mm
- r sot thit k phn mm ( tng ng vi tng giai on thit k)
- r sot lp m phn mm
- r sot kim th phn mm (tng ng vi k hoch v th tc kim th)
- r sot bo tr phn mm (ng vi k hoch v th tc kim th)
TL
r sot phn tch yu cu phn mm
Mc tiu: thm nh v xc minh yu cu phn mm
22

phi ch ra cc nhu cu ca ngi dng l c tho mn


Cc yu cu phi nht qun, ngha l khng mu thun nhau
Cc yu cu phi y : chng phi cha mi chc nng v mi rng buc m

ngi dng nhm n


Cc yu cu phi l hin thc, tc l c kh nng thc hin c

Ni dung:
tp trung vo kh nng vit ra cc yu cu h thng phn mm (chc nng, phi

chc nng, ngoi lai)


s ph hp v tnh ng n ca m hnh phn tch.
Vi cc h thng ln cn tng cng:

Cc r sot k thut chnh thc


vic nh gi cc nguyn mu cng nh cc cuc hp vi khch hng
Danh mc: xem xt cc ch sau:
(1) Phn hoch vn (h con) c y hay khng?
(2) Cc giao din trong v ngoi thc s c xc nh cha?
(3) Phn tch lnh vc thng tin c y , phi mu thun v chnh xc hay ko?
(4) M hnh d liu thc s phn nh cc i tng d liu, cc thuc tnh v cc
quan h?
(5) Tt c cc yu cu c th ln vt c mc h thng khng?
(6) lm bn mu dnh cho ngi s dng (khch hng) cha?
(7) Liu c thc hin c vi nhng rng buc quy nh bi cc phn t h thng
khc hay khng?
(8) Cc yu cu c ph hp vi lch biu, ngun lc v kinh ph hay khng?
(9) Cc chun thm nh c y hay khng?

r sot thit k phn mm ( tng ng vi tng giai on thit k)


Mc tiu: Hng n thit k m bo hai yu cu
Phn nh ng cc yu cu c t

cc phn
chc nng v rng buc
D liu , ph hp

C cht lng tt

Cu trc tt (phn hoch, giao din, modul ho)

Thut ton tt (t phc tp, tc cao, d hiu)

D liu tt (cu trc, biu din)

C th ln vt c (d hiu, d kim tra)


Ni dung:

R sot k thut chnh thc cho khu thit k tp trung vo:


23

thit k d liu
thit k kin trc
thit k th tc.

C 2 kiu r sot thit k (ph hp vi bc trin khai):

r sot thit k s b - preliminary design review (nh gi vic dch cc yu


cu thnh thit k d liu v thit k kin trc),

r sot thit k trn vn - design walkthrough (tp trung vo tnh ng n ca


thut ton).
Danh mc

R sot thit k s b
(1) Cc yu cu phn mm c c phn nh trong kin trc phn mm hay khng?
(2) C t c s mun ho hiu qu khng? Cc mun c c lp chc nng
hay khng
(3) Kin trc chng trnh c c phn tch khng?
(4) Cc giao din c xc nh cho cc mun v cc phn t h thng ngoi lai
cha?
(5) Cu trc d liu c ph hp vi lnh vc thng tin cha?
(6) Cu trc d liu c ph hp vi yu cu phn mm cha?
(7) Kh nng bo tr c xem xt cha?
(8) Cc nhn t cht lng c nh gi r rng cha?
R sot thit k ton b
(1) Thut ton c hon thnh chc nng mong mun khng?
(2) Thut ton c ng n logic khng?
(3) Giao din c ph hp vi thit k kin trc khng?
(4) phc tp logic c phi chng hay khng?
(5) S l sai c c t cha?
(6) Cu trc d liu cc b c tht s c xc nh?
(7) Kin to lp trnh cu trc xuyn sut cha?
(8) Cc chi tit thit k tun theo ngn ng thc hin cha?
(9) Dng cc c im h iu hnh hay l ph thuc ngn ng?
(10) dng logic compound hoc logic inverse?
(11) Kh nng bo tr c xt ti cha
r sot lp m phn mm
Mc tiu: r sot hng n m ngun t c
phn nh y , ph hp vi thit k

ph hp vi ngn ng s dng (chun, c php, khai bo d liu...)


Vn bn chng trnh tt (khng li chnh t, c cu trc, nht qun ...)

Ni dung
24

Danh mc
(1) Thit k c thc s c dch thnh m cha?
(2) C cc sai st chnh t hoc in n no khng?
(3) C thc s dng cc quy c ngn ng hay khng?
(4) C phc tng v cc chun mu lp m i vi phong cch ngn ng, ghi ch ...
(5) C ghi ch no khng ng n hoc m h?
(6) Kiu d liu v khai bo d liu c chnh xc hay khng?
(7) Cc hng s vt l c ng n hay khng?
(8) C phi tt c cc khon mc ca danh sch r sot thit k trn vn l c p
dng li hay khng?
r sot kim th phn mm (tng ng vi k hoch v th tc kim th)
Mc tiu:

nh gi mt cch ph phn cc k hoch kim th v cc th tc kim th


hng n m bo cc phng php, cc chin lc v cc k thut c s

dng v k hoch tt
Ni dung:
chin lc kim th

t trn xung
t di ln
v n ln (big bang)

k thut kim th

kim th hp en

kim th hp trng

kim th ti trng

kim th lun si (cho h thi gian thc)

s dng CASE

K hoch kim th tng th

Gii thiu chung


M t h thng cn kim th
Cc mc tiu kim th
Phng php s dng
Ti liu h tr

K hoch
Thi gian, a im
Ti liu kim th: cc ca kim th, tin trnh, lch trnh
iu kin

Cc yu cu: phn cng, phn mm, nhn s

Kim sot qu trnh kim th


25

Danh mc:
(1) Cc pha th nghim ch yu c thc s c nh r v c xp xp tun t
hay khng?
(2) Theo di cc yu cu (tiu chun) c c thit lp nh mt phn ca pha phn
tch yu cu phn mm hay khng?
(3) Cc chc nng ch yu c c trnh din sm khng?
(4) K hoch th nghim c ph hp vi k hoch d n tng th hay khng?
(5) Lch trnh th nghim c c xc nh r rng hay khng?
(6) Ngun lc v cng c th nghim c minh nh v sn sng hay cha?
(7) thit lp c ch lu tr cc bo co cha?
(8) Cc b li (driver) v cc cung (stub) th nghim c minh nh cha?;
cng vic pht trin chng c lp lch cha?
(9) Th nghim cng chu p lc cho phn mm c c t cha?
(10) C hai loi th nghim hp trng v hp en c c t cha?
(11) C phi tt c cc ng logic c lp u c th nghim?
(12) C phi tt c cc ca th nghim u c minh nh v lp danh sch vi
cc kt qa ch mong?
(13) Vic x l sai c c th nghim?
(14) Cc gi tr bin c c th nghim?
(15) Cc yu cu thi gian v s din tin c c th nghim?
(16) Cc bin th chp nhn c ca kt qu th nghim mong i c c t
cha?
r sot bo tr phn mm (ng vi k hoch v th tc kim th)
(1) xt n cc hiu ng ph gn vi cc i thay hay cha?
(2) Xem xt yu cu i thay c lp ti liu, c nh gi v c chp thun
hay cha?
(3) Bo co xem xt s i thay cho tt c cc bn quan tm hay cha?
(4) Cc r sot k thut chnh thc thch hp c tin hnh hay cha?
(5) Mt r sot chp thun cui cng c thc hin bo m rng ton b phn
mm thc s c cp nht, c th nghim v c thay th hay cha?

2. Cc o c trng cht lng phn mm


2.1. Cc o ch s cht lng chng trnh
a. Cc o v kin trc chng trnh (DSQI)

26

23. Nu cc k hiu v gii thch cc o: s1,s2,s3,s4,s5,s6,s7 v D1=1&0, (D2=1s2/s1), (D3=1-s3/s1), (D4=1-s5/s4), (D5=1-s6/s4), (D6=1-s7/s1)?
K hiu

S1: tng s cc m dun c xc nh trong kin trc chng trnh

S2: s cc m un m chc nng ng n ca n ph thuc vo ngun d liu


u vo hay cc th tc sinh ra d liu c dng ngoi module

S3: s cc mun c chc nng ph thuc vo x l trc

S4: s cc khon mc c s d liu (Bao gm cc i tng d liu v tt c


cc tnh cht xc nh cc i tng )

S5: Tng s cc khon mc d liu ng ch

S6: s cc cc khc d liu(cc bn ghi khc nhau hay cc i tng ring l)

S7: s cc mun vi li vo v li ra duy nht (x l ngoi l khng c xem


l li ra bi)
o

D1: Cu trc chng trnh. =1 Khi thit k kin trc ch dng mt phng php
nht nh, v D1=0 khi khc

D2: c lp d liu ca mun D2=1-s2/s1

D3: c lp x l ca modun: D3=1-s3/s1

D4: Kch c c s d liu D4=1-s5/s4

D5: phn chia c s d liu D5=1-s6/s4

D6: c trng vo/ra ca m dun D6=1-s7/s1

24. S dng cng thc wiDi vi wi = 1 nh th no v lm g?


Cng thc tnh ch s cht lng cu trc thit k

DSQI= wiDi vi i=1ti 6, wi l trng s tng i ca tm quan trng ca tng gi tr


trung gian Di v wi = 1 (Nu tt c cc Di c trng s bng nhau th wi=0,167)
Cn ghi li DSQI ca cc thit k thnh cng trc y, tnh trung bnh ca chng.
V t so snh gi tr trung bnh vi thit k hin ang pht trin.
Nu ch s DSQI ln ny thp hn nhiu so vi gi tr trung bnh th cn phi
tip tc cng vic thit k v r sot.
Tng t nu tin hnh mt s thay i chnh vi thit k hin c th c th tnh
ton c hiu qu ca nhng thay i ny ln DSQI.

25. Gii thch ni dung cc thnh phn v ngha o SMI =


v cch s dng n?
MT Fa Fc -Fd
MT
27

SMI l ch s trng thnh phn mm (Software Multinity Index). N ch ra tnh n nh


ca sn phm phn mm (da trn nhng thay i xut hin cho tng ln a ra sn phm)
- MT: s cc m un pht hnh ln ny
- Fc: s cc mdun c thay i trong ln pht hnh ny
- Fa: s cc mdun c thm vo trong ln ny
- Fd: s cc mdun ca ln pht hnh trc m b b i trong ln pht hnh ny
Khi SMI tin ti 1 th sn phm bt u n nh. SMI cng c th c dng:
- nh o cho cc hot ng bo tr phn mm theo k hoch
- thi gian trung bnh to ra ln pht hnh sn phm phn mm
- cc m hnh kinh nghim cho n lc bo tr c th c pht trin.

28

26.S o phc tp ca McCabeda trn ci g v nhng i lng c th no?


- S o da trn phc tp chu trnh trong th chng trnh ca mt modun
+ S chu trnh c chu trnh lng nhau
+ S chu trnh trong mt chu trnh
- Ngi ta cng dng cc min phng ca th phng biu din th chng trnh
27.m bo cht lng phn mm da trn thng k ngha l g?N gm nhng
cng vic g? K t nht nm nguyn nhn ca nhng khuyt im trong phn
mm?
L bo m cht lng thng k phn nh mt xu th ngy cng tng trong cng
nghip.
Cng vic bao gm:
- Thu thp v phn loi thng tin khim khuyt phn mm.
- C gng ln vt tm ra nguyn nhn
- Dng nguyn l Pare c lp 20% khim khuyt
- Sau khi tm c nguyn nhn s chnh sa cc nguyn nhn ca khim khuyt
Cc nguyn nhn gy ra khim khuyt c th l:
- c t khng y hoc sai st (IES)
- Hiu nhm khi giao tip vi khch hng (MCC)
- Lch hng d nh khi c t (IDS)
- Vi phm cc chun lp trnh (VPS)
- Sai trong biu din d liu (EDR)
- Khng ph hp vi giao din modun (IMI)
- Sai trong logic thit k (EDL)
- Th nghim sai hoc khng y (IET). . .
28. Nu cng thc khim khuyt ca mt sn phm mt pha pht trin? v cng
thc tnh khim khuyt ca sn phm cui cng? Gii thch ngha ca n?
- Ngi pht trin cn phi tnh ch s khim khuyt cho mi bc chnh pht trin
phn mm
- Cc thng tin tnh mc khim khuyt
+ Di= tng s cc khim khuyt
+ Si= s cc khim khuyt nghim trng
+ Mi= S cc khim khuyt va phi
+ Ti =s cc khim khuyt nh
- Vi mi bc chnh trong pht trin phn mm cn tnh ch s pha PIi:
PIi=w1(Si/Di) + w2(Mi/Di) + w3(Ti/Di)
Trong w1, w2, w3 l trng s tng ng vi cc khim khuyt nghim trng, va
phi v nh.
Trng s ny c lng mc thit hi m loi mang li
29

- Ch s khim khuyt DI c tnh nh sau:


DI= (PI1 + 2PI2 +. . .+iPIi)/PS
Trong PS l kch c ca sn phm (l LOC = s dng m, hoc s tuyn b thit
k, hoc s trang ti liu) tu theo tng bc.
Theo cng thc: cc khim khuyt cng v sau cng v sau cng nhn vi h s ln
29. Tip cn hnh thc cho SQA ngha l g? Qu trnh phng sch l g? Phng
chm ca k thut ny l g?
Ngi ta nhn thy cn phi dng mt cch tip cn hnh thc hn trong vic bo
m cht lng phn mm, cch tip cn ny s b sung cho cc hot ng m t
trn
Tip cn hnh thc ho: c t hnh thc cho php chng minh tnh ng n, kim
tra li, chuyn t ng thnh chng trnh . . . lm tng cht lng.
- Kim chng chng trnh mt cch hnh thc (chng minh tnh ng n) v bo
m cht lng phn mm thng k hp li vi nhau cho ta ta mt k thut ci
thin cht lng sn phm, c gi l qu trnh phng sch.
- Phng chm ca k thut ny l: Phng khim khuyt hn l tr khim khuyt

2.2. Cc o v s tin cy v an ton


30. tin cy ca phn mm l ci g? o tin cy da trn nhng d liu no?
- tin cy ca phn mm l mt yu t quan trng trong cht lng phn mm.
- tin cy phn mm c nh ngha theo thut ng thng k: xc sut thao tc
khng tht bi ca chng trnh my tnh trong mt mi trng t bit vi mt thi gian
nh r.
- tin cy ca phn mm c o trc tip v c nh gi qua cc d liu pht
trin v cc d liu lch s.
31. Th no l tht bi ca phn mm? C my thang bc? l nhng thang bc no?
Khi ni n tin cy phn mm th ny sinh cu hi tht bi ngha l g? Tht bi l
vic khng thi hnh ng cc yu cu phn mm.

C cc thang bc:
- Mc : Tht bi c th n thun ch l s phin phc, c khi tht bi l c mt
thm ha.
- Thi gian: lai tr tht bi c khi ch mt vi giy, c khi mt c tun, c thng.
- Hu qu: Khi loi bt tht bi th c th li sinh ra cc li khc v ko theo tht bi
khc.

32. Nu ch tiu tnh tin cy? Nu cng thc tnh sn sng? Gii
thch ngha ca n?
- Vi cc h thng da trn my tnh th mt s o n gin v tin cy chnh l thi
gian trung bnh gia hai ln tht bi k tip (MTBF- Mean Time Between Failure):
30

MTBF = MTTF + MTTR


- MTTF (Mean Time To Failure) l thi gian hot ng lin tc trung bnh
- MTTR (Mean Time To Repair) l thi gian sa xong li trung bnh

ngha:
MTBF l cch o hu ch hn nhiu so vi t s s khim khuyt/KLOC (LOC-Line
Of Code) v ngi dng cui cng quan tm ti nhng tht bi ch khng quan tm m
li (nh nghin cu).
Do cc li trong chng trnh khng c cng mc (nng, nh khc nhau) nn s cc
li ch cho ta mt ch s nh v tin cy ca h thng.
VD: Khi a 1 chng trnh vo vn hnh trong 14 thng , trong cc li cha c pht
hin c li ch c pht hin sau dm chc nm, cc li cn li vi MTBF khong 18-24
thng
- sn sng phn mm l xc sut chng trnh vn hnh ng vi yu cu cc thi
im nh v c tnh nh sau:
MTTF/(MTTF + MTTR) x100%
ngha
Th hin t l thi gian lm vic trung bnh trong tng thi gian vn hnh
L o gin tip v kh nng bo tr c (s ny cng gn 100 l bo tr tt)
33. C nhng m hnh tin cy no? N da trn tham bin no v trn gi thit no?
M hnh tin cy gieo ht da trn tng no? Mc tiu lm g
C hai m hnh tin cy phn mm:
- M hnh tin on tin cy nh l mt hm ca thi gian lch
- M hnh tin on tin cy nh l mt hm ca thi gian x l tri qua (thi
gian vn hnh ca CPU). Loi ny c coi l tt hn.
Cc m hnh tin cy phn mm da trn cc gi thit:
- Thi gian g li gia cc xut hin sai c phn phi m vi nhp xut hin sai,
nhp ny t l thun vi s cc li cn li
- Mi li b pht hin s c loi tr ngay lp tc v s li cn li gim i 1
- Nhp tht bi gia cc li l khng thay i
Cc gi thit ny cn phi bn: v mt li c loi tr th c th nhiu li khc li
c sinh ra.
Mt lp cc m hnh tin cy phn mm da vo cc c trng tn ti ca mt
chng trnh v tnh ton s d on cc sai tn ti trong phn mm
Cc m hnh ny da trn cc quan h nh lwngj nh mt hm ca o tnh
phc tp, chng lin kt thit k c chng hoc cc thuc tnh hng m ca
chng trnh vi mt c nh s khi pht cc li c tin rng c trong chng
trnh cho
M hnh tin cy gieo ht da trn tng no? Mc tiu lm g?
MT 31Fa Fc -Fd
MT

tng: Mt chng trnh c gieo mt cch ngu nhin mt s cc li(k) hiu


chun (calibration) vo mt chng trnh; sau em kim th (bng mt s ca th
nghim); tnh xc sut tm c j li trong tp J lixem nh tng ng vi xc sut
tm c k li gieo trong K li nhng vo chng trnh.
j/J=k/K
Mc ch:
- dng nh mt ch bo ca tin cy phn mm;
- hoc mt cch thc tin hn nh mt o nng lc pht hin sai ca mt tp hp
cc ca th nghim.
34 an ton phn mm l ci g?C nhng phng php no phn tch an
ton?
An ton phn mm l mt hot ng bo m cht lng phn mm tp trung vo
vic minh nh v nh gi cc mi nguy him tim n c th gy nh hng phn
tc dng thm ch l gy ra tht bi ca ton h thng.
an ton phn mm xem xt li cch thc li ny sinh trong mt iu kin no
c th dn ti ri ro. Ngha l li khng c xem xt trong chn khng m c
nh gi trong hon cnh ca ton b h thng da trn my tnh.
C cc phng php nh:
Phn tch cy li:
dng ln mt m hnh th cc t hp tun t v song song cc s kin dn n
mt s kin hay mt trng thi h thng mo him.
Dng mt cy li pht trin tt c th quan st c hu qu ca mt dy cc tht
bi lin kt vi nhau, xut hin trong cc thnh phn khc nhau ca h thng.
Logic thi gian thc: xy dng m hnh h thng bng cc c t cc s kin v cc
hnh ng tng ng. M hnh s kin hnh ng c th c phn tch bng cch
dng cc ton t logic th nghim cc quyt on an ton i vi cc thnh phn
ca h thng v nh thi cho chng
M hnh li petry: dng xc nh xem li no l nghim trng nht
35. Kho st nhu cu SQA gm nhng ni dung g? nhm tr li cc cu hi g?nu c
nhu cu th mnh lm g?
- Gm ba ni dung nhm tr li ba cu hi
+ Kim k cc chnh sch SQA: chnh sch, th tc, chun no c trong cc pha
pht trin?
+ nh gi vai tr ca k ngh phn mm, bo m cht lng trong t chc hin
ti c quyn lc n u?

32

+ nh gi mi quan h SQA: Giao din chc nng gia SQA vi cc n v khc


nh th no? vi cc ngi thc hin r sot k thut chnh thc, qun l cu hnh v th
nghim
- Nu c nhu cu th cn phi tin hnh nh gi cn thn bng quy tc b phiu.
36. C nhng vn g t ra khi trin khai SQA? Li chca SQA l g? Nguyn tc
chi ph hiu qu ca SQA l g?
- SQA c nhng vn sau y
+ Kh thit lp trong mt t chc nh: kh c ngun lc thc hin cc hot ng
cn thit m hin cha c.
+ N biu th mt thay i c tnh vn ho: nn chng bao gi d dng thc hin
+ N i hi tiu tn khng t tin
- SQA c nhng li ch sau y:
+ Phn mm c t cc khim khuyt tim n hn v do mt t cng sc v thi
gian kim th v bo tr.
+ tin cy cao hn v do khch hng tho mn hn
+ Gim ph tn bo tr
+ Gim ph tn tng th ton b vng i ca phn mm
- Nguyn tc chi ph: mc c bn SQA c xem l hiu qu v chi ph nu
C3>C1 + C2
y:
+ C3 l chi ph t cc sai do khng c SQA
+ C1 l chi ph cho SQA ca chng trnh
+ C2 l chi ph do cc sai khng tm thy khi chng trnh c SQA

3. Kim th phn mm
3.1. Khi nim v kim th
37. Ti sao phi kim th phn mm? Mc tiu kim th l g? T c quan nim
gi sai v kim th phn mm?
Kim th phn mm l yu t quyt nh ca SQA v khu in hnh ca r sot c t
thit k v lp m
L do cn kim th phn mm:
mun nhn thy phn mm nh l mt phn t ca h thng hot ng
Hn ch chi ph phi tr cho cc tht bi do li gy ra sau ny
c k hoch tt cho sut qu trnh pht trin
o Tm quan trng. Kim th chim:
-

40% tng cng sc pht trin


>=30% tng thi gian pht trin
33

Vi phn mm nh hng ti sinh mng chi ph c th gp t 3 dn 4 ln tng chi ph


khc cng li
Mc tiu kim th (Glen Myers): Kim th l mt qu trnh vn hnh chng trnh
tm ra li. V vy:
Mt ca kim th tt l ca kim th c xc sut cao trong vic tm ra mt li
cha c pht hin
Mt ca kim th thng li l mt ca kim th lm l ra c t nht mt li
cn cha c pht hin
Mt ca kim th thng li lm l ra khim khuyt, ng thi mang li cc li ch ph:
chng t rng cc chc nng phm mm lm vic tng ng vi c t,
chng t cc yu cu thc thi l ph hp
c thm cc ch s tin cy phn mm v cc ch s v cht lng phn mm
ni chung
Kim th khng th chng minh c vic khng c khim khuyt, n ch c th
chng minh rng khim khuyt phn mm hin hu
Ngi ta thng c nhng quan nim sai g v kim th phn mm?
- Ngi pht trin khng tham gia kim th
- Phn mm c cng b mt cch rng ri ngi l kim th n mt cch tn
nhn
- Ngi kim th ch quan tm khi kim bt u
- Kim th c th chng minh c phn mm khng c khim khuyt
- Php kim th thnh cng l kim th khng tm ra li no
- Ch cn kim th mt ln
38. Th no l mt ca kim th tt? ca kim th thnh cng? Li ch ph kim th l g
Mt ca kim th tt l ca kim th c xc sut cao trong vic tm ra mt li
cha c pht hin
Mt ca kim th thng li l mt ca kim th lm l ra c t nht mt li cn
cha c pht hin
Mt ca kim th thng li lm l ra khim khuyt, ng thi mang li cc li ch ph:
chng t rng cc chc nng phm mm lm vic tng ng vi c t,
chng t cc yu cu thc thi l ph hp
c thm cc ch s tin cy phn mm v cc ch s v cht lng phn mm
ni chung

39. Biu dng thng tin kim th m t ci g? v biu ca n?


Biu dng thng tin kim th tun theo hnh mu c m t nh sau:
Hai lp c cung cp cho tin trnh kim th:
34

(1) Cu hnh phn mm: Bn c t yu cu phn mm, bn c t thit k, chng trnh


gc
(2) Cu hnh kim th: K hoch v th tc kim th, cc cng c kim th d nh dng,
cc ca kim th cng kt qu d kin.

Cu hnh
phn mm

Cu hnh
kim th

Kim th

G li

nh gi

M hnh
tin cy

Phn mm
chnh sa

tin cy
d on

Kim th c tin hnh v tt c cc kt qu c nh gi bng cch so snh vi


kt qu d kin. Khi pht hin li, vic g li bt u c tin hnh.
Tin trnh g li thng khng d kin c thi gian nn vic lp lch kim th
tr nn kh khn.V d: 1 li ch ra s sai bit 0.01% gia kt qu trng i v thc
ti c th mt 1 gi, 1 ngy hay 1 thng chun on v sa cha.
Khi cc kt qu kim th c thu thp v nh gi th cht lng v tin cy
phn mm dn c khng nh. Nu hay gp phi li nghim trng yu cu sa i
tht k th cht lng v tin cy l ng ng v cn kim th thm.
Mt khc, nu cc chc nng phn mm dng nh lm vic ng v li gp phi l
d sa th c th rt ra mt trong hai kt lun:
(1) Cht lng v tin cy phn mm chp nhn c
(2) Kim th khng tng xng lm l ra nhng li nghim trng.
Nu vic kim th khng lm l ra li no th c th hoi nghi rng cu hnh kim
th cha c cn nhc ng mc, cc li vn cn n np trong phn mm v s b
pht hin bi ngi dng.
40. K cc i tng v phng php kim th phn mm? Mi phng php
thng c s dng vo giai an no ca qu trnh pht trin?
i tng v phng php kim th
Loi
i tng
Phng php

n v
M
Hp trng

Tch hp
Thit k
Hp en v trng

Thm nh
Yu cu
Hp en

H thng
Ton h thng
M hnh

Mi phng php thng c s dng vo giai on no ca qu trnh pht trin:


- Hp trng: s dng trong giai on M ha
- Hp trng v en: thit k
- Hp en: Yu cu
- M hnh: K ngh h thng
35

41. Mt ca kim th l ci g? Mc tiu thit k ca kim th? cc bc xy dng


mt ca kim th?
Thit k ca kim th thng vi mong mun tm ra c nhiu sai nht vi n lc v
thi gian l nh nht
Trong cc thp k 80-90 c nhiu loi phng php thit k ca kim th
Cc phng php tt phi cho mt c ch gip ta bo m tnh y v cung cp
cho ta mt kh nng tht s pht hin c cc sai trong phn mm
C th kim th theo mt trong hai k thut sau:
Kim th hp en
Kim th hp trng
42. Kim th hp trng l ci g? N nhm kim tra nhng ni dung no?
Kim th trc tip trn m ngun
Khm xt cc chi tit th tc, cc con ng logic, cc trng thi ca chng trnh
Ch rng s con ng logic l ln mt chng trnh nh, chng hn ch c 100
dng PASCAL vi mt vng lp th s con ng c th xt ln n 1014 v gi s
mt kim th hetes 1ms th tn 3170 nm lm kim th cho tt c cc con ng .
S dng cu trc iu khin ca thit k th tc hnh thnh cc ca kim th
m bo:

o Mi con ng c lp trong modun cn c thc hin t nht mt ln.


o Mi rng buc logic c thc hin c hai pha ng v pha sai
o Thc hin tt c cc vng lp bin ca n v c vi cc bin vn hnh.
o Thc hin Cc cu trc d liu ni ti m bo tnh hiu lc ca n.
43. Kim th hp en l ci g? N gip kim tra nhng ni dung no ca i tng
kim th?
Ch thc hin cc php th tin hnh qua giao din phn mm
Dng thuyt minh cc chc nng phn mm v vn hnh ng
t ch ti cu trc logic ni ti ca phn mm
44. Chin lc kim th phn mm l ci g? Nu cc nguyn tc trong chin lc kim
th phn mm?
Mt chin lc kim th phn mm l s tch hp cc k thut thit k ca kim th
to thnh mt k hoch gm mt dy cc bc hng dn qu trnh kim th phn
mm thnh cng.
Mi chin lc kim th phn mm:
Phi tch hp c:
- vic lp k hoch th nghim
36

- vic thit k ca s dng


- vic tin hnh kim th
- vic thu thp v nh gi cc thng tin kt qu

Phi mm do c v c sng to v vic theo khc hng (m tt c cc


h thng ln da trn my tnh u cn kim th tng xng)
Kim th l mt tp cc hot ng c th lp k hoch trc c v c tin
hnh mt cch c h thng. Chnh v vy m cn xc nh mt khun mu cho
vic kim th phn mm trong tin trnh k ngh phn mm
. Nu cc nguyn tc trong chin lc kim th phn mm?
Cc c trng khi qut khn mu
Bt u mc modul v tip tc cho n khi tch hp thnh mt h thng da trn my
tnh trn vn
Cc k thut kim th khc nhau l thch hp ti nhng thi im khc nhau
c c ngi pht trin v nhm kim th c lp cng tin hnh
kim th v g li, song vic g li phi thch ng vi tng chin lc kim th
Nguyn tc
Chin lc kim th phn mm phi thch ng vi cc kim th mc thp (kim tra
xem tng khc m ngun c c thc thi ng n khng) cng nh vi cc kim
th mc cao (thm nh xem cc chc nng h thng ch yu c ng theo yu cu
ca khch hng khng)
Mi chin lc phi cung cp cc hng dn cho nhng ngi thc hnh tin
hnh kim th v cung cp mt tp cc ct mc cho cc nh qun l qun l hot
ng m bo cht lng
Qu trnh kim th phi o c c th nhn ra cc vn cng sm cng tt
45. Nu cc bc ca chin lc kim th thi gian thc v gii thch ni dung ca
mi bc
Gm bn bc:
1. Kim th tc v: Kim th tng tc v mt cch c lp vi nhau (bng c k thut hp
trng v hp en). N cho php pht hin sai v logic v chc nng. Cha pht hin
hin sai v thi gian v ng x.
2. Kim th ng x:
- S dng cng c CASE to m hnh h thng m phng ng x ca
h thi gian thc, xem ng x ca n nh hu qu ca s kin ngoi.
Dng kt qu hot ng phn tch ny thit k ca kim th (tng t
k thut thi nhn qu)
- Phn lp s kin: (tng t phn hoch tng ng)....
46. C nhng loi cng c t ng no tr gip kim th, m t ni dung ca mi loi
- B phn tnh phn tch cu trc v nh dng chng trnh
37

- B kim ton m:xem nhng khai bo ng x ca mt chng trnh


- B phn x l khai bo:xem nhng khai bo ng x ca chng trnh c tht s ph hp
vi thc hin chng trnh thc hay khng
- B tp kim th: cho ra cc gi tr tin xc nh, cc tp vo in hnh cho chng trnh
chu kim th
- B sinh d liu kim th: gip la chn d liu lm chng trnh ng x theo mt
cch c bit
- B xc minh kim th: a ra bo co gi tr trung bnh cho chuyn gia m bo cht
lng phn mm
- Cc tr gip cho qu trnh kim th:
+ Ci t mt chng trnh d nh trong mi trng kim th
+ Nui chng trnh o bng d liu vo
+ M phng ng x ca cc m dun ph
- B so snh u ra: so snh mt tp d liu ra vi mt tp khc xc nh s khc bit
- H tin hnh k hiu: Dng c t i s
- M phng mi trng: l mt h thng da vo my tnh chuyn bit c th kim th cc
mi trng ngoi lai ca phn mm thi gian thc v m phng cc iu kin vn hnh
ng thc s
- B phn phn tch dng d liu: Phn tch quy m v tn sut dng d liu
47. Ai l ngi phi tham gia kim th phn mm? Nu vai tr v trch nhim ca mi
i tng?
Kim th phn mm gm c ngi pht trin v nhm kim th c lp
Ngi kim th lun chu trch nhim kim th n v (modul) do mnh pht trin v
bo m mi modul thc hin ng chc nng c thit k
Trong nhiu trng hp, ngi pht trin cng tham gia kim th tch hp
Ch sau khi kin trc phn mm y th nhm kim th c lp mi bt u
lm vic
Vai tr ca nhm kim th c lp l g b nhng vn c hu gy ra bi ngi
xy dng kim th nhng th m chnh h xy dng nn
g b mu thun v mi quan tm
c tr cng cho vic tm li
Kt qu ca nhm kim th c lp cn c gi cho t chc bo m cht lng
phn mm
Ngi pht trin khng c y chng trnh sang ngi kim th ri b i
Ngi pht trin cng lm vic vi ngi kim th xuyn sut mt d n phn mm
bo m vic kim th c tin hnh trit

38

3.2. Cc phng php kim th


a. Kim th hp trng
48. Kim th hp trng da trn c s no thit k ca kim th? Thit k ca kim
th phi m bo iu kin g?
Kim th hp trng s dng cu trc iu khin ca thit k th tc hnh thnh cc ca
kim th.
Thit k ca kim th phi m bo:
- Bo m rng mi con ng c lp trong mt mun u c thc hin t nht
mt ln.
- Mi rng buc logic c thc hin c pha true v false.
- Thc hin tt c cc vng lp bin ca n v c vi bin vn hnh ca n.
- Thc hin cc cu trc d liu ni ti bo m tnh hiu lc ca n
49. th dng gm nhng yu t no? Xy dng n da vo u? N c c trng g,
th dng dng lm g?
th dng ( th chng trnh) gn ging dng iu khin,
N l mt th cu trc gm
+ Mi nt (hnh trn) biu th mt s (hoc c th l 0) cu lnh th tc
+ Mi cnh ni hai nt biu din dng iu khin.
+ Chia mt phng thnh nhiu min.
+ Mt nt l v t nu n biu th s phn nhnh hoc hi nhp ca cung.
th dng dng biu din thit k th tc
50. Con ng c bn trong th dng l ci g? phc tp ca chu trnh l g?
Nu cc cng thc tnh phc tp?
Cc con ng c bn trong th dng:

Tun t

if

while

39

until

case

m bo cc cu lnh u c kim th t nht mt ln, ta cn tm tt c cc ng


iu khin c lp trong chng trnh, tc l mi ng khc vi cc ng khc t nht
mt lnh.
S cc ca mt chng trnh l gii hn trn ca s cc kim th cn phi tin hnh. N
c gi l phc tp chu trnh ca chng trnh
Mt tp c bn con ng c lp l tp:
- Mi cnh ca th dng u c mt trong mt con ng ca tp ny.
- Mi con ng ca tp u cha t nht mt cung khng c mt trong mi con
ng khc ca n.
- S lng cc con ng ca tp ny cho ta s o phc tp chu trnh ca mt
chng trnh
0

V d:

1
2
3

81
0

7
1
1

4
5

S khi
1

2,3
6
7

4,5
8

10

ng c lp: - ng 1: 1-11
11
- ng 2: 1- 2-3-4-5-10-1-11
- ng 3: 1-2-3-6-7-9-10-1-11
- ng 4: 1-2-3-6-8-9-10-1-11
Cc cng thc tnh phc tp:
phc tp chu trnh V(G) i vi 1 th dng G c nh ngha l:
40

o V(G) = s min phng


o V(G) = E - N + 2
lung)
o V(G) = P + 1

(Vi E l s cnh, N l s nt ca th
(Vi P l s nt v t)

51. Ma trn th nghim c cu trc nh th no? N c dng lm g?


Cu trc: Ma trn kim th l ma trn vung c kch thc bng s cc nt trong th
dng
- Mi dng/ct ng vi tn mt nt
- Mi l tn mt cung ni nt dng n nt ct
Ma trn kim th c s dng nh l mt d liu c cu trc kim tra cc con ng
c bn.
ma trn kim th tr thnh cng c mnh m trong vic nh gi cu trc iu
khin chng trnh khi th nghim ngi ta s dng ma trn c trng s (thm trng s
cho cc cung). Trng s c th l:
- Xc sut cung c tin hnh
- Thi gian x l tn trong qu trnh i ngang qua cung .
- B nh i hi trong qu trnh i ngang qua cung .
- Ngun lc c i hi trong qu trnh i ngang qua cung
Ma trn kim th dng nh mt d liu c cu trc kim tra cc ng c bn. (V
th tc suy dn ra th dng v xc nh mt tp cc ng c bn tun theo vic my
mc ha)
52 Nu cc loi iu khin trong cu trc iu khin v cho v d? C nhng loi sai
no trong iu kin khi kim th
Cc loi iu khin:
- iu khin n: l 1 bin bool hoc 1 biu thc quan h (c th c ton
t ph nh ng u)
Biu thc quan h l mt biu thc Bool xc nh quan h gia 2 biu thc s
hc bng mt php so snh: <, <=, =, >=, #.
- iu kin kt hp l iu kin cu thnh t hn mt iu kin n nh
cc ton t Bool: hoc hp, giao, ph nh
cc loi sai.
- Sai bin, ton t bool, sai s hng trong biu thc ton t Bool, sai ton t
quan h, sai biu thc s hc.
53. Chin lc kim th phn nhnh ngha l g? Yu cu t ra cho kim th phn
nhnh l g?
-

Kim th phn nhnh l chin lc kim th tng iu kin chng trnh

41

Kim th nhnh: Vi mi iu kin kt hp C th cc nhnh true v


false ca C v mi iu kin n trong C phi c kim th t nht 1 ln.
- Yu cu: Khng ch pht hin sai trong iu kin m m cn pht hin cc sai khc
trong chng trnh.
54. Chin lc kim th min l ci g? N da trn t tng no?
- Chin lc kim th min i hi 3 hoc 4 kim th cho mt biu thc quan h (c
th nghim cho cc trng hp <,>,= v c th l khc na).
Vi biu thc quan h c dng E1<ton t quan h>E2 th cn ti 3 php kim th
lm cho gi tr ca E1 ln hn, bng hoc nh hn gi tr ca E2 tng ng. Nu <ton t
quan h> l khng ng v E1 v E2 ng th 3 php kim th ny m bo pht hin ra
ton t sai. pht hin ra li trong E1 v E2, php kim th lm cho gi tr ca E1 ln hn
hay b hn gi tr ca E2 nn to ra s khc bit gia hai gi tr ny nh nht c th c
c
Vi biu thc Bool c n bin s cn 2n php kim th c th c nn c ch thun li nu
n nh v s thiu thc t nu n ln.
55. Chin lc kim th BRO l ci g? N da trn t tng no?
Chin lc kim th BRO l kim th ton t quan h v nhnh. K thut ny m bo
vic pht hin ra cc li quan h v nhnh trong iu kin m tt cc cc bin Bool v ton
t quan h ch xut hin 1 ln v khng c bin chung.
BRO dng n rng buc iu kin cho iu kin cn th. Gi s trong iu kin C cn
th c n-1 iu kin n, rng buc ca C (c n iu kin n) l (D1, D2,, Dn), trong
Di l mt c t rng buc u ra ca iu kin n tng ng ca C. Ta ni rng rng
buc D ca iu kin C l c ph bi mt thi hnh ca C nu nh trong qu trnh thi
hnh ca C, u ra outcome ca mi iu kin n trong C tho mn cc rng buc
tng ng.
T tng: Cho php th nhy cm sai cho biu thc bool. Vi mt biu thc Bool duy
nht (mt biu thc bool m mi bin bool ch xut hin 1 ln) vi n bin Bool (n>0)
chng ta c th d dng sinh ra mt tp kim th t hn 2 n php th sao cho tp kim th
ny m bo pht hin ra nhiu li ton t bool v cng l hiu qu pht hin cc li
khc.
57. Kim th iu khin dng d liu ngha l g? Cho v d?
Phng php kim th dng d liu l kim th tuyn chn cc ng ca chng trnh
tng ng vi vic nh v cc xc nh bin v cc s dng bin trong chng trnh.
Ngi ta nghin cu mt s chin lc th nghim dng d liu v so snh chng.
Gi s rng mi cu lnh ca chng trnh c gn vi s cu lnh duy nht v mi hm
khng c ci bin cc tham s ca n v cc bin ton cc.
Vi mi cu lnh S ta nh ngha:
DEF(S) = {X | cu lnh S cha nh ngha ca X}
USE(S) = {X | cu lnh S cha mt s dng X}
42

Nu S l cu lnh if hoc cu lnh vng lp th DEF(S) l rng, cn USE(S) c xc nh


ty theo iu kin trong S.
Gi thit: nh ngha ca bin X cu lnh S l cn sng ti cu lnh S nu c mt con
ng t S ti S m trn con ng khng cha mt nh ngha no khc ca X.
Mt dy truyn s dng (DU dy truyn) ca X l DU=[X,S,S] vi X trong DEF(S), v
trong USE(S) v nh ngha X trong S vn cn sng trong S.
Chin lc th nghim dng d liu i hi rng mi DU u phi c ph t nht mt
ln.
Kim th DU khng bo m ph tt c cc nhnh ca chng trnh; tuy nhin mt nhnh
khng c ph bi DU kim th l rt him.
Kim th dng d liu l hu ch chn cc ng ca chng trnh c cha lng cc
cu lnh if hoc vng lp.
V d:
Proc x
B1;
Do while C1
If C2
Then
If C4
Then B4;
Else B5;
Endif;
Else
If C3
Then B2;
Else B3;
Endif
Endif
Enddo;
B6;
End proc;
Gi s bin X c nh ngha trong cu lnh cui ca cc khi B1, B2, B3, B4, B5 v
c dng trong cu lnh u tin ca cc khi B2, B3, B4, B5 v B6. Chin lc kim
th DU i hi vic thc hin ca ng i ngn nht t mi Bi 0<i<=5 ti mi Bj 1<j<=6
(Vic kim th nh vy cng bao qut mi vic dng bin X trong cc iu kin C1,C2,
C3, C4) Mc du c ti 25 dy chuyn DU ca bin X, chng ta ch cn nm ng i
bao qut cc dy chuyn DU ca X t Bi 0<i<=5 ti B6 v cc dy chuyn DU khac c th
c bao qut bng cch lm cho nm ng ny c cha nhng vic lp ca chu trnh.

43

58. Kim th iu khin vng lp ngha l g? Cho v d?


Kim th vng lp l mt k thut kim th hp trng tp trung hon ton vo tnh hp l
ca kt cu vng lp. C th xc nh 4 lp vng lp khc nhau: vng lp n, vng lp
lng, vng lp ni tip, vng lp phi cu trc
+ Vng lp n: tp cc kim th c p dng cho vng lp n vi n l s ti a
cc bc c php qua vng lp
+ Nhy qua ton b vng lp
+ Ch qua mt bc vng lp
+ Hai bc qua vng lp
+ m bc qua chu trnh vi m<n
+ n-1, n, n +1 bc qua vng lp
+ Vng lp lng: S php kim th c th s tng theo cp s nhn khi mc lng
nhau tng ln:
+ Bt u t vng lp bn trong nht. t tt c cc vng lp khc vo gi tr
ti thiu
+ Tin hnh kim th vng lp n cho vng lp bn trong nht trong khi
gi cc vng lp bn ngoi gi tr tham s lp ti thiu. B sung cc kim th
khc v vic vt cn hay gi tr b loi ra
+ Tin dn ra ngoi, thc hin php kim th cho vng lp tip nhng gi tt
c cc vng lp bn ngoi hn gi tr ti thiu v cc vng lp lng bn trong khc
gi tr in hnh
+ Tip tc cho ti khi mi vng lp c kim th ht.
1 Vng lp ni tip: Dng cho cc
vng lp n nu mi vng lp l
c lp. Tuy nhin nu 2 vng lp
ni nhau v s m ca vng lp 1
c dng lm gi tr khi u
cho vng lp 2 th cc vng lp l
khng c lp nhau. Khi cc vng lp l khng c lp th p dng cho cc vng lp
lng nhau.
2 Vng lp phi cu trc: Bt k khi no c th c lp vng lp ny nn c thit
k li phn nh vic dng cc kt cu lp trnh c cu trc

b. Kim th hp en

44

59. M hnh ca kim th hp en quan tm n nhng nhn t no ca phn mm?


N nhm tm ra cc loi sai no? Nu cc phng php p dng cho n?
Phng php kim th hp en tp trung vo cc yu cu chc nng ca phn mm
Vic kim th hp en nhm tm cc loi sai sau:
- Chc nng thiu hoc khng ng
- Sai v giao din
- Sai trong cu trc hoc trong truy cp d liu ngoi
- Sai thc thi chc nng
- Sai khi u hoc kt thc modun
Nu cc phng php p dng cho kim th hp en?
- Phn hoch tng ng: chia min vo ca chng trnh thnh cc lp d liu
a ra cc ca kim th
- Phn tch gi tr bin (BVA): l k thut b sung thm cho phn hoch tng ng.
Thay v chn bt c phn t no ca lp tng ng, BVA chn cc ca kim th
st vi lp tng ng. Thay v tp trung vo iu kin vo, BVA cn a ra cc
ca kim th t min ra. Phng php ny cho rng s ln cc sai xut hin bin
nhiu hn l vng d liu trung tm. Khng nhng ch n d liu trong v st
bin m cn ch n d liu ngoi v st bin
- th nhn qu: cung cp cch biu din chnh xc cc iu kin logic v hnh
ng tng ng
- Kim th so snh(kim th da vo nhau): thc thi nhiu bn khc nhau cho cng
mt c t. Thc hin cc k thut kim th hp en trn vi cc sn phm cho
cng cc ca kim th v cng cc d liu vo. So snh cc kt qu thu c. Nu c
khc bit th nh th c sai trong mt sn phm no .
60. Trnh by phng php phn hoach: nguyn tc, mc tiu v thit k ca kim th?
Phng chm xc nh lp tng ng l gi?
- Nguyn tc: chia min vo ca chng trnh thnh cc lp d liu a ra cc ca
kim th.
- Mc tiu: Nhm tm ra mt ca kim th b l mt lp sai, bi vy n rt gn s
ca kim th cn pht trin
- Thit k ca kim th: Da trn nh gi cc lp tng ng i vi mt iu kin
vo. Lp tng ng biu th cho mt tp cc trng thi hp l hay khng hp l
i vi iu kin vo
- Phng chm:
o iu kin vo l phm vi rng hay mt gi tr c bit th cn xc nh:
+ Mt lp tng ng hp l
+ Hai lp tng ng khng hp l
o iu kin vo c t mt thnh phn ca mt tp hoc iu kin Bool th
cn xc nh:
45

+ Mt lp tng ng hp l
+ Mt lp tng ng khng hp l
61. Phn tch gi tr bin ngha l g? Phng chm phn tch gi tr bin l g?
Phn tch gi tr bin ngha l chn la cc ca kim th thc hin cc gi tr cn. Phng
php ny cho rng s ln cc sai xut hin bin nhiu hn l vng d liu trung tm.
Khng nhng ch n d liu trong v st bin m cn ch n d liu ngoi v st
bin.
Phng chm:
o Nu iu kin vo l mt min gii hn bi a v b th cn thit k cc ca
kim th cho c a v b, trn a v di b.
o Nu iu kin vo c t mt s cc gi tr th nn thit k cc ca kim th
cho c cc s trn v di s nh nht v ln nht.
o p dng cc phng chm 1 v 2 cho cc iu kin ra.
o Nu chng trnh trung gian c cc bin c m t th chc chn phi
thit k ca th nghim thi hnh cc cu trc d liu bin ca n.
62. K thut nhn qu ngha l g? Nu cc bc ca k thut ?
K thut th nhn qu l mt k thut thit k ca kim th, n cung cp mt biu din
chnh xc cc iu kin logic v cc hnh ng tng ng.
- Cc bc: 4 bc
o Lp danh sach cc nguyn nhn (iu kin vo) v kt qu (hnh ng) cho
tng mun v gn gi tr nh danh cho chng.
o Pht trin th nhn qu
o Chuyn th thnh bng quyt nh
o Cc quy lut ca bng quyt nh c s dng xy dng cc ca kim
th
63. Chin lc kim th thi gian thc gm my bc? l nhng bc no? Gii thch
ni dung c bn mi bc?
Chin lc kim th thi gian thc gm 4 bc:
- Kim th tc v: kim th tng tc v mt cch c lp vi nhau (cho c k thut
hp trng v k thut hp en). Kim th loi ny cho php:
o Pht hin cc sai v logic v chc nng
o Khng pht hin cc sai v thi gian v ng x
- Kim th ng x:
o S dng cng c CASE to m hnh h thng m phng ng x ca
mt h thi gian thc v xem ng x ca n nh l mt hu qu ca cc s
kin t ngoi. Kt qu cc hot ng phn tch ny c th c dng
thit k cc ca kim th.
46

o Dng k thut tng t nh phn hoch tng ng ng phn lp s


kin. Mi s kin c kim th ring v ng x ca h thi hnh c
c khm nghim pht hin cc sai do vic x l kt hp vi cc s
kin .
o Kim th mi lp s kin. Cc s kin c a vo trong h thng theo
th t ngu nhin v vi tn sut ngu nhin nhm pht hin cc sai ng
x.
- Kim th lin tc: kim th tm cc sai lin quan n thi gian. Cc tc v khng
ng b khi c lin tc vi cc tc v khc. V th cn kim th vi cc nhp iu
d liu v ti x l khc nhau xc nh xem liu cc sai ng b lin tc c xy
ra khng. Hn na, cc tc v khng ng b do giao tip ph thuc hng i thng
ip hoc truy cp kho d liu (data store) cng c th bc l cc sai v c d
liu.
- Kim th h thng: sau khi tch hp phn cng v phn mm tin hnh kim th h
thng tm ra cc sai v giao din.
c. Kim th n v
64. Kim th n v l g? Quan h ca n vi hot ng m ha nh th no?
Kim th n v l tin trnh kim th tp trung kim chng vo n v nh nht ca thit
k phn mm l mun. Kim th n v bao gi cng hng theo hp trng v bc
ny c th c tin hnh song song cho nhiu mun.
N kim th cc phn sau:
- Th nghim giao din
- Khm nghin cu trc d liu cc b.
- Th nghim vi cc iu kin bin.
- Cc ng c lp.
- Cc ng x l sai.
Quan h ca n vi hot ng m ha:
- Kim th n v thng c coi l phn ph thm ca bc m ha.
- Sau khi bc m ngun c pht trin, c r sot v kim tra tnh ng n
c php th vic thit k ca kim th n v bt u
65. Ni dung c th ca hot ng kim th n v lin quan n nhng vn g
(tham s, vo ra, d liu cc b, th tc tnh ton, cc dng iu khin)?
Hot ng kim th n v lin quan n cc vn :
- Tham s:
+ S lng cc tham s c bng i s hay khng?
+

Cc tnh cht ca tham s v ca i s c ng nht khng?

H thng cc n v ca tham s v ca i s c ng nht khng?

S cc i s c truyn gi modun c bng s cc tham s hay khng?


47

+ Cc thuc tnh ca cc i c truyn gi mun c trng vi cc thuc


tnh ca cc tham s hay khng?
+ H thng n v ca cc i c truyn gi mun c trng vi h thng
n v ca cc tham s hay khng?
+ S thuc tnh v cc ci khc ca cc i ca cc hm c nh sn c ng n
hay khng?
+ Mi tham kho lin quan ti cc tham s hin khng kt hp vi u vo ch?
+

Cc i ch c c i cha?

Cc nh ngha bin ton cc c nh mt trong sut mun khng?

+ Cc rng buc chuyn qua nh l tham s cha?


- Vo ra: Khi mt mun c thc hin I/O ngoi lai th phi tin hnh thm:
+ Tnh cht ca cc file c ng n hay khng?
+ Cc cu lnh OPEN/CLOSE c ng n khng?
+ c t hnh thc c ng vi cc cu lnh I/O?
+ C ca buffer c ng vi c ca bn ghi khng?
+ Cc file c m trc khi s dng khng?
+ Cc iu kin end-of-file c c x l?
+ Cc sai lm I/O c c x l?
+ C sai vn bn no trong thng tin ra?
- D liu cc b: Cu trc d liu cc b cho mun cn l ngun gy li chung. V th
nn thit k cc kim th bc trn cc li loi sau:
+ nh my khng ng hoc khng nht qun.
+ Gi tr ngm nh hoc gi tr khi thu sai.
+ Tn cc bin khng ng (sai ch hoc mt ch)
+ Kiu d liu khng nht qun.
+ Ngoi bit v a ch, underflow, overflow.
- Th tc tnh ton: Cc sai thng thy v tnh ton l:

+ Hiu lm hoc u tin cc php tnh s hc khng ng.


+ Cc php ton trn mode.
+ Khi s khng ng n.
+

S khng chnh xc
- Dng iu khin: Sau vic so snh th cc dng iu khin b thay. Cc ca th nghim
cn bc l cc sai nh:
So snh cc kiu d liu khc nhau.

u tin hoc ton t logic khng ng n.

D on mt ng thc, trong khi sai s lm cho ng thc khng chc c thc.


48

Cc gi tr hoc so snh khng ng n.

Khng kt thc vng lp hoc kt thc khng chnh xc.

Kh thot c khi tnh c gp s lp phn k

Cc bin lp b ci bin khng chnh xc.


66. K thut kim th n v s dng l g? v sao phi s dng k thut ? C nhng
kh khn thun li g?
Kim th n v s dng cc k thut:
- Kim th ng c s, kim th vng lp: V cc trng hp kim th nn c thit k
pht hin ra li do tnh ton sai, so snh sai hay lun iu khin khng ng. y l k
thut hiu qu pht hin mt phm vi rng cc li
- Kim th bin (nhim v cui cng, c l l quan trng nht): V phn mm thng tht
bi ti cc bin ca chng. Tc l li thng xut hin khi phn t th n ca mng n chiu
c x l; khi ln lp th i ca chu trnh vi i bc c gi, khi cc gi tr ti thiu hay
ti a cho php c gp phi. Kh khn: Cc trng hp kim th chy qua cu trc d
liu, lung iu khin v gi tr d liu ngay di, ti v ngay trn cc i v cc tiu rt
thng pht hin ra li.
d. Kim th tch hp
67. Kim th tch hp thc hin khi no? Ti sao phi kim th tch hp?
Kim th tch hp l mt k thut c tnh h thng xy dng cu trc chng trnh ngay
khi ang tin hnh kim th pht hin sai lin kt vi giao din.
Phi kim th tch hp v:
- D liu c th b mt khi i qua mt giao din
- Mt moun c theh c mt hiu ng bt li v tnh ln cc mun khc
- Cc chc nng ph khi kt hp li c th khng sinh ra chc nng chnh mong
mun
- Cc iu khng chnh xc ring r c th b phng i n mc khng chp nhn
c.
- Cc cu trc d liu ton cc c th l ra cc vn ..
68. C nhng phng php g c p dng cho kim th tch hp? m t tm tt ni
dung mi phng php?
C cc phng php:
- Phng php big-bang: c gng tch hp khng tng dn tc l xy dng chng trnh
bng cch tip cn v n ln big-bang. Tt c cc mdun u c t hp trc. Ton
b chng trnh c kim th nh mt tng th v thng s l mt kt qu hn lon.
Gp phi mt tp hp cc li. Vic sa i gp kh khn v vic c lp nguyn nhn b
phc tp bi vic tri rng trn ton chng trnh. Khi nhng li ny c sa th
nhng li mi li xut hin v tin trnh ny c tip din trong vng lp v hn.
49

- Phng php tch hp trn xung: y l mt phng php tch hp tng dn vi vic
xy dng cu trc chng trnh. Cc mun c tch hp bng cch i dn xung theo
trt t iu khin, bt u vi mun iu khin chnh (chng trnh chnh). Cc mun
ph thuc (v ph thuc cui cng) vo mun iu khin chnh s c t hp dn vo
trong cu trc theo hoc chiu su trc hay chiu rng trc.
- Phng php tch hp di ln: bt u xy dng v kim th vi cc mun nguyn t
(tc l cc mdun mc thp nht trong cu trc chng trnh). V cc mun ny c
tch hp t di ln nn vic x l yu cu i vi cc mun ph thuc vo mt mc no
bao gi cng c sn v nhu cu v cung b dp b.
69. Nu cc bc kim th tch hp t trn xung? u nhc im ca cch tip cn
ny?
Tin trnh tch hp c thc hin theo 5 bc:
1. Mun iu khin chnh c dng nh b li kim th (test driver) v tt c cc
mun ph tr c thay th bi cc cung (stub).
2. Thay th mt cung bi mun thc s tng ng.
3. Sau khi tch hp mun , tin hnh cc kim th tng ng.
4. Ngay khi hon thnh tp cc kim th ny th thay mt cung (stub) khc bng
mun thc (ngha l quay li bc 2).
5. C th th nghim li (ton b hoc mt phn cc th nghim trc) bo m
rng khng c sai mi no c sinh ra.
6. Li tip tc t bc 2 cho ti khi ton b cu trc chng trnh c xy dng
u, nhc im: Nhc im ca cch tip cn ny l s cn ti cc cung (stub) v
nhng kh khn kim th c th km theo chng. Kh khn do cc cung (stub) c th b
li bng u im ca vic kim th c chc nng iu khin ch yu sm.
70. Nu cc bc kim th tch hp t di ln? u nhc im ca cch tip cn
ny?
c thc hin qua 4 bc:
1. Cc mun mc thp c t hp vo trong cc cm (cluster) thc hin mt chc
nng ph tr c bit. (gi cc cluster l cc build)
2. Mt b li (chng trnh iu khin kim th) c vit phi hp u vo v
u ra ca ca kim th.
3. Th nghim cm .
4. Tho ri cc driver v cc cm c t hp ngc ln trong cu trc chng trnh
u nhc im: Nhc im chnh ca vic tch hp t di ln l lun cha chng
trnh nh mt chnh th cho n khi modun cui cng c thm vo. Bt li ny l tm
thi, thit k ca kim th d v khng cn cung.
71. Cc ti liu kim th tch hp gm nhng loi g?
+ Phm vi kim th
50

+ K hoch th nghim
+ Cc pha th nghim v cc cm (build)
+ Lch trnh
+ Phn mm chung (overhead)
+ Mi trng v ngun lc
+ Th tc kim th n (m t th nghim cho build n)
+ Th t tch hp
+ Mc ch
+ Cc mun c kim th
+ Cc kim th n v cho cc mun trong build
+ M t kim th cho mun m
+ M t phn mm overhead
+ Cc kt qu mong i
+ Kim th tch hp
+ Cc k thut v cc cng c c bit
+ M t phn mm overhead
+ D liu ca s dng
+ Cc kt qu ch i cho build n
+ Cc kt qu kim th thc s
+ Cc tham kho
+ Ph lc
e. Kim th h thng
72. Kim th Beta l ci g? Kim th Alpha l ci g? Gia chng khc nhau c bn
ch no ?
Ngi pht trin thc ra khng th on trc c khch hng thc s dng
mt chng trnh nh th no
Cc ch dn s dng c th b hiu lm
Cc t hp d liu l c th b s dng bt k
u ra c v l r rng vi ngi kim th nhng li kh hiu i vi ngi
dng
Khi phn mm c xy dng cho mt khch hng:
mt hot ng c tin hnh khch hng thm nh mi yu cu
tin hnh kim th l ngi s dng u cui ch khng phi ngi t hng
kim th chp thun c th tin hnh vi tun hoc vi thng mt ln, nh
m bc l c cc li tch lu lm suy gim h thng theo thi gian.
51

Khi phn mm c xy dng cho nhiu ngi dng:

kim th chp thun bi mt khch hng l khng thc t


Do phi dng qu trnh kim th alpha v beta cho nhiu ngi tin hnh
bc l cc sai m c l ch cc ngi s dng u cui mi c th pht
hin c

Kim th Alpha

c bn pht trin tin hnh


phn mm s c dng trong bi cnh t nhin ngi pht trin "nhm
qua vai" ngi s dng v bo co cc sai v cc vn s dng
c tin hnh trong mt mi trng c iu khin (theo k hoch ca
ngi pht trin)

Kim th Beta

c mt hay nhiu ngi t hng tin hnh


khng hin din ngi pht trin
p dng phn mm trong mi trng thc, khng c s kim sot ca ngi
pht trin
khch hng s bo co tt c cc vn (thc hoc tng tng) m h gp
trong qu trnh kim th cho ngi pht trin mt cch nh k
da theo bo co ngi pht trin tin hnh sa i v chun b phn phi
bn pht hnh cho ton b cc ngi t hng

73. Ni dung chnh ca kim th h thng ? Nu mt s cu hi t ra cho kim th h


thng ?
H thng da vo my tnh do nhiu bn xy dng, ngi pht trin phn mm
ch l mt bn
Vic kim th h thng d c nguy c " li cho nhau"
Ngi pht trin phn mm cn on trc cc vn giao din c th ny ra v
Pht hin cc thit k ng x l sai thng qua kim th tt c cc thng tin
n t cc phn t khc ca h thng
Tin hnh mt lot kim th m phng cc d liu xu hoc cc sai tim
tng khc ti giao din phn mm
Bo co cc kt qu kim th lm chng c phng nga li cho nhau
Nhng ngi tham gia vo trong vic hoch nh v thit k cc kim th h
thng bo m rng phn mm c kim th y
Vic kim th h thng thc t l mt lot cc bc kim th khc nhau c mc
ch chnh l th y h thng da trn my tnh.
74 Kim th phc hi l g ?
Nhiu h thng cn phi phc hi sau li li tip tc x l trong mt thi
gian c t trc
52

Trong mt s trng hp, h thng cn th li, ngha l vic x l li bt buc


khng c lm ngng hot ng ca ton b h thng
Trong mt s trng hp khc li phi c khc phc theo tng chu k c
c t nu khng thit hi kinh t nghim trng s xut hin
Kim th phc hi l kim th h thng bt buc phn mm phi hng theo
nhiu cch xem c phc hi c hay khng
C 2 cch phc hi:
Nu phc hi t ng (c thc hin bi bn thn h thng): khi ng li,
c ch checkpoint, phc hi d liu v cho chy li s c nh gi l ng
n
Nu phc hi i hi s can thip ca con ngi th phi nh gi thi gian
trung bnh dng sa cha v xc nh xem liu n trong gii hn
chp nhn c khng?
75. Kim th an ninh l g ?
Kim th an ninh c gng kim tra c ch bo v c xy dng trong h thng
c c t c cc hiu qu trc cc t nhp khng hp php hay khng?
Cn ch ti tt c cc loi tn cng: "trc mt", "ngang sn", "sau lng"
Khi kim th an ninh, ngi kim th ng vai tr ca k t nhp h thng
V nguyn tc, thi gian v ngun lc th cui cng s t nhp c
Bi ton thit k h thng t ra l:

Lm cho vic thm nhp tn ph nhiu hn gi tr thu c


Cng sc b ra xy dng cng c bo v phi t hn gi tr mt i nu b
t nhp

76. Kim th p lc l g
Cc k thut kim th hp trng v hp en c dng nh gi chc nng
v s thi hnh ca chng trnh bnh thng
Kim th p lc l vn hnh h thng vi i hi ngun lc vi s lng, tn
sut v cng d thng. Chng hn:
Kim th sinh ra 10 ngt trong 1 giy trong khi t l trung bnh ch l mt
hoc hai
t l d liu vo c th tng ln theo mt cp ln no xc nh cch
cc chc nng vo s p ng
cc kim th c th i hi b nh ti a cc ti nguyn khc c th phi
thc hin
cc ca kim th c th gy ra p v h iu hnh
cc ca kim th c th gy ra vic tiu tn d liu thng tr trn a cng
V bn cht, ngi kim th c gng ph v chng trnh
53

Mt loi khc ca kim th p lc l kim th nhy cm: lm bc l cc t hp


d liu (lp d liu vo c hiu lc) hay s kin m c th gy ra vic x l
khng n nh hoc khng chnh xc
77. Kim th thi hnh l g?
i vi cc h thng nhng v h thi gian thc, phn mm cung cp chc nng
yu cu nhng khng ph hp vi cc yu cu thi hnh u l khng chp nhn
c
Kim th thi hnh c thit k kim th vic thi hnh run-time ca phn
mm trong khi h thng c tch hp
kim th thi hnh xut hin trong tt c cc bc ca qu trnh kim th, tuy
nhin ch n khi tt c cc phn t ca h thng c tch hp th kim th
mi c th thc s l chc chn
kim th thi hnh i khi gn lin vi kim th p lc v c hai thng i hi
cc dng c phn cng v phn mm. l do cn s tng hp ngun lc
(trong, ngoi). Nh dng c ngoi lai c th gim st cc khong vn hnh,
cc s kin log (ngt) khi n xut hin, c th ly mu cc trng thi my
Kim th c th lm bc l cc tnh th dn n s suy gim hoc tht bi h
thng tim n
78. G ri c hiu l g ? N thc hin khi no ? Kh khn ca vic g ri l g ?
G ri c hiu l vic loi tr cc li tm c trong qu trnh kim th
G ri c thc hin khi vic thc hin mt ca kim th thnh cng
G li l kh khn:

Triu chng c th xa nguyn nhn (v khng gian). Ngha l nhng triu


chng c th xut hin trong mt phn ny ca chng trnh, trong khi
nguyn nhn thc t c th nh v mt v tr xa
Triu chng c th tm thi bin mt khi c mt sai khc c sa
Triu chng thc t c th b gy ra khng li (nh do s khng chnh xc
ca vic lm trn s)
Triu chng c th thc s c gy ra bi sai ca ngi dng m khng d
theo di c
Triu chng c th l kt qu ca vn thi gian ch khng phi l vn
x l
C th kh ti th hin cc iu kin u vo (ng dng thi gian thc, th
t u vo khng xc nh)
Triu chng c th b gin on, lc c lc khng (cc h nhng vi lin kt
phn cng v phn mm khng tho ri c)

Triu chng c th do cc nguyn nhn c phn tn trong mt s cc nhim v

54

79. Trnh by tin trnh g ri ? Cch thc g ri ? u nhc im ca chng


Qu trnh g li lun dn ti hai kh nng

Tm ra c nguyn nhn, chnh l c v kh li


Khng tm c nguyn nhn. Trng hp ny ngi g li c th nghi ng
mt nguyn nhn no v thit k mt ca kim th gip anh ta thm
nh nghi ng v nh vy cng vic chnh sai li tip tc nh mt vng
lp

G li l kh khn:

Triu chng c th xa nguyn nhn (v khng gian). Ngha l nhng triu


chng c th xut hin trong mt phn ny ca chng trnh, trong khi
nguyn nhn thc t c th nh v mt v tr xa
Triu chng c th tm thi bin mt khi c mt sai khc c sa
Triu chng thc t c th b gy ra khng li (nh do s khng chnh xc
ca vic lm trn s)
Triu chng c th thc s c gy ra bi sai ca ngi dng m khng d
theo di c
Triu chng c th l kt qu ca vn thi gian ch khng phi l vn
x l
C th kh ti th hin cc iu kin u vo (ng dng thi gian thc, th
t u vo khng xc nh)
Triu chng c th b gin on, lc c lc khng (cc h nhng vi lin kt
phn cng v phn mm khng tho ri c)
Triu chng c th do cc nguyn nhn c phn tn trong mt s cc
nhim v chy trn cc b x l khc nhau

Cch thc g ri
o V dng v mu
o Ln theo vt cua
o Loi tr dn cc nguyn nhn
Phng php V dng v mu
L phng php chung nht nhng km hiu qu nht
p dng cch ny khi chng cn cch no khc
dng trit l "hy my tnh tm ra sai": xem xt tt c v ghi li tt c vi
hi vng tm ra trong ng thng tin khng l nguyn nhn ca sai
Mc d cng c th dn ti thnh cng nhng thng l ph cng sc v thi
gian, nhiu trng hp khng kh thi
Phng php Ln theo vt c
Kh thng dng v c th dng thng li trong cc chng trnh nh
Bt u ln ngc t ch thy triu chng sai trong m ngun (bng tay) cho
ti khi nh v c sai
55

Khi s dng lnh tng ln th s con ng i ngc c th c nhiu n


mc khng qun l ni

Phng Php Loi tr nguyn nhn


Cch lm: t chc li d liu lin quan n xut hin sai c lp nguyn
nhn tim n
mt "gi thuyt nguyn nhn" c t ra t d liu trn c dng
chng t hoc phn chng gi thit
hoc mt danh sch cc nguyn nhn tim n c t ra v cc kim th c tin
hnh loi tr cc nguyn nhn trong danh sch
Nu kim th ch ra mt nguyn nhn no c ha hn th tinh ch d liu
lin quan c lp li
Khi tm thy li th phi chnh sa. Nhng vic sa mt li c th gy ra
nhiu sai khc
sa trit , trc khi sa nn t hi tm gii php
Nguyn nhn ny c th sinh ra phn khc ca chng trnh hay khng
(trong nhiu tnh th, mt khim khuyt chng trnh c th gy ra mt mu
sai logic m n c th c sinh ra mt ni khc)
Li no c th c sinh ra tip? Trc khi chnh sa nn xt li m ngun
(tt hn ht l xt li thit k) nh gi s gn kt gia logic v cu trc
d liu
Chng ta c th lm g ngn cn li ny ngay ch u tin? (thng c
nhiu gii php nh thit k la chn)
f. Qun l cu hnh

80. Qun l cu hnh phn mm l ci g? Ni dung ca hot ng qun l cu hnh


gm nhng cng vic g?
Qun l cu hnh phn mm:

l tp cc hot ng qun l cc thay i trong sut vng i phn mm


l mt hot ng bao trm sut qu trnh pht trin phn mm
l cc hot ng theo di v kim sot, bt u t d n pht trin phn mm
v ch kt thc khi m phn mm khng hot ng na.

Qun l cu hnh phn mm c xem l mt hot ng bo m cht lng


phn mm, c p dng cho tt c cc pha ca k ngh
Ni dung ca hot ng qun l cu hnh gm nhng cng vic

Qun l cu hnh phn mm gm 5 nhim v c th sau:

Xc nh cu hnh
Kim sot version
Kim sot thay i
Kim ton cu hnh
56

Bo co

81. Cu hnh phn mm l ci g? Ni dung cc khon mc chnh trong cu hnh phn


mm gm nhng g?
Kt qu ca qu trnh k ngh phn mm l cc thng tin c th c chia thnh
3 loi:
Cc chng trnh my tnh (c mc ngun v mc chy c)
Cc ti liu m t chng trnh my tnh (nhm n c nhng ngi thc
hnh k thut ln nhng ngi dng)
Cc cu trc d liu (c bn trong v ngoi chng trnh)
Cc khon mc cu thnh cc thng tin c sn ra nh l mt b phn ca
qu trnh k ngh phn mm c tp hp li gi l CU HNH PHN MM
* Ni dung cu hnh phn mm gm
c t h thng
K hoch d n phn mm
c t yu cu

c t yu cu phn mm
Nguyn mu thi hnh c hoc nguyn mu "giy t"
S tay s dng s ng

c t thit k

M t thit k d liu
M t thit k kin trc
M t thit k moun
M t thit k giao din
M t i tng (nu dng k thut hng i tng)

M ngun v kim th

K hoch v th tc kim th
Cc ca kim th v cc kt qu c ghi li
Cc s tay vn hnh v s tay lp t
Chng trnh thi hnh c
Cc moun v m thi hnh c
Cc moun lin kt

M t c s d liu

Lc v cu trc cc file
Ni dung h s ban u

S tay ngi s dng


Cc ti liu bo tr
57

Cc bo co nhng vn phn mm
Cc yu cu bo tr
t thay i k ngh
Cc chun v cc th tc cho k ngh phn mm

82. Qun l cu hnh nhm mc tiu g?Nm nhim v ca qun l cu hnh l g


Mc tiu nguyn thu ca qun l cu hnh phn mm l kim sot cc thay i
Sau ny c thm cc mc tiu:
Minh nh cc khon mc cu hnh, cc version ca phn mm
S kim ton cu hnh phn mm cng bo m rng phn mm c
pht trin ng v vic bo co tt c cc thay i l c p dng cho cu
hnh
Nm nhim v ca qun l cu hnh l

Xc nh cu hnh
Kim sot version
Kim sot thay i
Kim ton cu hnh
V bo co
83. Phng php g c p dng cho vic qun l cu hnh? Mc gii l ci g? S
dng mc gii kim sot s thay i nh th no?
Phng php hng i tng p dng cho vic qun l cu hnh
Mc gii l mt ranh gii c t ra:

Trc n th c th thay i nhanh chng v khng chnh thc


Sau n th c th thay i, nhng cn cc th tc c bit v chnh thc c
th nh gi v kim th tng thay i mt

ng mc gii l nh du vic phn pht mt vi khon mc cu hnh


phn mm
Ti ng mc gii cc khon mc cu hnh phn mm tng ng c a
vo c s d liu d n

84. Trnh by tin trnh kim sot s thay i?


Nhn ra nhu cu thay i
Ngi dng trnh yu cu thay i
Ngi pht trin nh gi
Sinh ra bo co v thay i
58

Ngi c thm quyn quyt nh kim sot thay i


Xp hng cc yu cu, sinh ra th t thay i k thut
Phn cc i tng cu hnh cho cc c nhn
Cc (khon mc) i tng cu hnh "check out"
Thc hin thay i
Ra sot thay i (kim ton)
Cc (khon mc) i tng cu hnh "check in"
Thit lp cc ng mc gii kim th

Yu cu b bc b
Thng bo cho ngi dng

Xem li cc thay i s c bao gm vo trong ln phn


pht mi
Xy dng li phin bn mi ca phn mm
R sot li s thay i ca tt c cc khon mc cu hnh
(kim ton)
Bao gm cc thay i vo trong phin bn mi
Phn phi phin bn mi
85. Phin bn l ci g? Lm th no kim sot cc phin bn
* Phin bn l mt thc th mi ca mt CI (Configuration Item) sau khi qua mt hoc
nhiu ln xem xt v thay i
* Kim sot cc phin bn =t hp cc th tc v cc cng c qun l cc phin bn
khc nhau ca cc i tng cu hnh ( c to ra trong qu trnh k ngh phn
mm)

86.Kim ton cu hnh phn mm ngha l g? Hot ng kim ton cn tr li nhng


cu hi g?
Kim ton cu hnh phn mm b sung cho r sot k thut chnh thc bng
cch nh gi mt i tng cu hnh cho cc c tnh m thng khng c
xt trong qu trnh r sot
Hot ng kim ton cn tr linhng cu hi sau:
Thay i c c t trong trt t thay i k thut c thc hin hay
cha? Nhng ci bin ph no c phi hp?
R sot k thut chnh thc c tin hnh nh gi s ng n k
thut hay cha?
Cc chun k ngh phn mm thc s c tun th cha?
i thay ni bt ln trong cc khon mc phn mm cha? C c t
ngy v tc gi ca i thay khng? Cc thuc tnh ca i tng cu
hnh phn nh c i thay cha?

59

Cc th tc qun l cu hnh phn mm quan st i thay , ghi li n,


bo co v n c c tun th hay khng?
Tt c cc khon mc cu hnh phn mm thc s c cp nht cha?

11. Bo co hin trng ngha l g? N cn tr li c nhng cu hi g? u ra ca


bo co hin trang dnh cho ai? mc tiu ca n l g?
Bo co hin trng l mt nhim v qun l cu hnh phn mm
N tr li cc cu hi sau:

Ci g xy ra?
Ai lm?
Xy ra khi no?
S cn nh hng no khc na?

u ra ca bo co hin trng cu hnh c th c t trn mt c s d liu


trc tuyn sao cho nhng ngi pht trin phn mm hay nhng ngi bo tr c
th truy cp cc thng tin thay i
Mc tiu ca n l gip ta loi tr vn bt cp lin quan nhiu ngi bng
cch ci thin giao tip gia h. Vn bt cp:
k ngh phn mm c th tn hng thng tri xy dng phn mm cho
mt c t phn cng khng dng na
Ngi nhn ra cc hiu ng ph nghim trng do mt thay i c
xut khng thc c rng n c thc hin

60