• No results found

Data Flow Testing - Strategies

N/A
N/A
Protected

Academic year: 2021

Share "Data Flow Testing - Strategies"

Copied!
16
0
0

Loading.... (view fulltext now)

Full text

(1)|   

(2). à àà{   

(3)   

(4) .

(5)    

(6)   ¦ |   

(7)   

(8)   

(9)  

(10)   

(11)   ¦ |    

(12)        Gd,k,u,c,p£ ¦      

(13)    

(14)   G  £                   ¦ á  

(15)  

(16) 

(17)    

(18)                ¦ D   

(19)  

(20)  .

(21) r   

(22)     ¦ 

(23)  

(24)     

(25)              

(26)      

(27)   ¦        

(28)                 .     á                             .

(29) á   Gá| !£ ¦    

(30)    " 

(31)   

(32)  ¦ ádu-path       

(33)      #   $       #     %.      ¦ á| !    " 

(34)   

(35)     .           .    ¦ á| !                ¦    

(36)          ¦ á| !  

(37)      .

(38) á   Gá| !  £ 2 ample: á  Begin. &. . '. (. ). End. From the figure, we see that variables A and B are defined on link (1,2). It is evident that any path taken for the graph will traverse through (1,2) . Hence the criterion for variables A & B as per ADUP is satisfied. But we have a redefinition at link (3,4). Variable C will not satisfy ADUP if only the path (1,3) is taken, thus violating the ADUP definition. ADUP becomes complicated when a variable is redefined in many places..

(39) á    

(40) Gá £ ¦ *#       

(41)  ¦ á     

(42)    .         

(43)         .    Begin. &. '. (. . ). ,. End. . +           # "  G'#(#)£ G'#)£     + á   

(44) #   .   #

(45) G)#,£    G'#(#)£G'#)£.

(46) á   Gá| !  £ 2 ample: á  Begin. &. . '. (. ). End. From the figure, we see that variables A and B are defined on link (1,2). It is evident that any path taken for the graph will traverse through (1,2) . Hence the criterion for variables A & B as per ADUP is satisfied. But we have a redefinition at link (3,4). Variable C will not satisfy ADUP if only the path (1,3) is taken, thus violating the ADUP definition. ADUP becomes complicated when a variable is redefined in many places..

(47) á  -     

(48)   Gá! .D£ ¦ +       # #            ¦ Gá! .D£    

(49)           .   #     .   " .      + .            #      "      #  .   .

(50) á  -     

(51)   Gá! .D  £ Flow graph annotated for variable Z. !   !! ( 0 ' ) 2 Begin & ,. 3 End. Z. ¦ + Gá! .D£  

(52) #.         !"  .    +  !" .   #   "     ¦ / $ G&#'£#G(#)£#G)#,£#G,#0£           .     1  $ G'#(£#G0#2£#G #3£                 1#   "    .

(53) á   -    

(54)   GáD "!£ ¦ +   

(55)   

(56) #      .            .      .      #        G $ £  .          ¦ |.    GáD .!£   

(57)   

(58)      .             .         .

(59) á   -    

(60)   GáD "!  £ Flow graph annotated for variable Y Begin. &.   ) ' ( ,   Y Z. End. &5. 3. . 2. 0. ¦ á    #áD  

(61)    4  G&#'#(#)#2# #3#&5£  .            G)#,#0#2£ ¦ +   

(62)   

(63) #.          "  .   +   "  .   #" .      * #GáD .!£ 

(64)    G&#'#(#)#2# #3#&5£.

(65) á |.     

(66) Gá|£ ¦ á|  

(67)   $ GáD .!£  Gá! .D£  

(68)   ¦ |.   á|   

(69)   

(70)     .                       G £   G£ UU efer the earlier slide for fig. ¦  G&#'#(#)#,#0#2# #3#&5£    á|  

(71)   4  1#   6      á|    # 6  á|  

(72)   $  GáD .!£ Gá! .D£  

(73)   ¦ 7.            .   .

(74) á!   - 

(75)  ¦ +   

(76)   

(77) #.         !"   .    ¦ +  !"  .   #         G 

(78)  £ ¦ |.   á!    

(79)   

(80)   Gá! .D£  

(81) #    "      "    

(82)   .    á!   $ Gá! .D£.

(83) áD     - 

(84)   ¦ á  áD   

(85)  ¦ |.    áD    

(86)   

(87)   GáD .!£  

(88) #   "       "     

(89)  .    ¦ +   G  £ áD    $ GáD .!£.

(90) r

(91)   

(92)   . 

(93)  àhis shows the relative strength of data flow & control flow testing strategies. . 

(94)  àest cases are based on the elative strength of .  testing strategies.. . . . . 

(95) 

(96)  

(97)     !   

(98) ". G G 

(99) 

(100) 

(101).  

(102) 

(103) . .  . .  . 

(104)  

(105) . .   àhe strength of the testing strategies reduces along the Direction of the arrow. For example, All-Uses is weaker than All DU paths..

(106) | 888|

(107)  $.      m 6ote          -   $ 88.

(108)

References

Related documents