コードカバレッジを知ろう

Add1036688abcb2e3dbff7c3090f7e35?s=47 imtnd
December 16, 2018

 コードカバレッジを知ろう

コードカバレッジを知ろう

WACATE 2018 Winter
https://wacate.jp/workshops/2018winter/program/#session6

Add1036688abcb2e3dbff7c3090f7e35?s=128

imtnd

December 16, 2018
Tweet

Transcript

  1.    WACATE 2018 WINTER 2018/12/16

  2.   •  .@imtnd) • %+)!" ( ($) /

    • #,-*(  • WACATE   • Naite$&'+
  3. &'#.1"2/ •-+')(%)  !2* ,0'$   •  •

    -+')(%) 
  4.          

  5. 

  6. A746526 “/E=F8E6526(A746526?1@FC52 6&%<D.B>526)% 526 #3:6*+)?1@FC<D.B>,;1+-6 -B2#"$ ( $( ' 526!'”

    ISTQB526  Foundation Level 0B92   Version 2011.J02 http://jstqb.jp/dl/JSTQB-SyllabusFoundation_Version2011.J02.pdf
  7. !.0,:<!94021-2! • 94021-2" • ! " #*;-! %(8/03?  (<602>

    ?&')2602> $8<5  ?&%+=37=-!1-2%
  8.       Extreme programming https://en.wikipedia.org/wiki/Extreme_programming

  9.    TestPyramid https://martinfowler.com/bliki/TestPyramid.html

  10. ?:79859( • (859A=@(859"&(859  ,+''- • ?:79859% '#!859)(859A= @%*$1;C-.%)' •

    (859%) -& 3C5 • 60>B24</'859 etc
  11. =;79869- • ,8692&10%*$ +" •8694?:-$+// 869 $( 0%*$!0 → =;79869.

    ,')'/#%*$" → 2(0,.4?:3<>752(0 $!0
  12. +)," -2*'/*')+), ()+0"% !#+),%  $ 6   7

    .3&,/*')+), ()+0"#+),% $ 6)+5,14,+), +), 7
  13.          

          
  14. $  !%#"&#  !%# (    

       0 ≦   ≦ 255 '  =-1,0,255,256,a etc "&#
  15. O^VMW\SPJ";H8?BEHZ[SU • TQU;H!J BJH8?>3Y]PLKU?: =C(:<-J%;H8?6>7H • TQU9I=4A4. J%,;H8?6')5F%,; H8?6>7H •

    Y]PLNUC C-?:=@C&C+2J:=4HC56  H • 6:3TQU:<RXUCTQUC 6 >7H • /0BTQU;HEGD3A41$>#ATQU6 *
  16.   

  17. !/()-%" •$/#!/(*./ ,/' •&/, +*,   • ,/' 

      ,/'  
  18.    •  •    •

      •  • (MC/DC)
  19.  •     statement coverage = 

       × 100
  20. "(#%'#$&!  • (    ) " #

    100% False True
  21.      5

  22.     No Yes age isStudent  1

    19 True 1000 
  23. !!  •    ( TRUE OR FALSE)

    "!" condition coverage =    "  × " × 100
  24.     • condition1 TrueFalse condition2 TrueFalse 

    100% False True
  25.    •   condition1 condition2  1

    True False False 2 False True False False True
  26. -91*.59+270/ and(&&) # 38,64"& $False   ' )! %'()

    ← condition2True$ "$ (! %' condition1 condition2  1 True False False 2 False : False
  27. condition1 condition2  1 True False False 2 False (

    False '#' % !&$"      condition1 condition2  1 True False False 2 False ( False 3 True True True
  28.      10

  29.     No Yes age isStudent  1

    19 False 1200 2 20 True 1200 (3 19 True 1000) 
  30. !  •    "!"  decision coverage

    =    " × 100
  31. ' "#*,!)+%#   • ( -  .&$( 

    100% False True
  32. &(+$*  •!#  %,+!, •"'+$*  &(+$*  ,)

     branch coverage =   #,) × 100
  33. %&( $'!  • ( )  *"# 100% False

    True
  34.      (  ) 10

  35.     No Yes age isStudent  1

    19 True 1000 2 20 False 1200 
  36. 9BF?;(MC/DC) H I • =GC@6:D@69E*>CA785(.021  • !and"/!or", #4 

    • 9BF?;-, ,@<A4&% )100%)*1 • X$+*1)$31',@<A • X$+*1)$31',@<A • (J)K4&%@<A$ %1
  37.  !" (MC/DC) # $ A B C 1 T

    T T T 2 T T F F 3 T F T T 4 T F F F 5 F T T T 6 F T F F 7 F F T F 8 F F F F & (A or B) and C ABC A(T) T-- A(F) F-- B(T) -T- B(F) -F- C(T) --T C(F) --F ↑ %   
  38.  (MC/DC)   A B C 1 T T

    T T 2 T T F F 3 T F T T 4 T F F F 5 F T T T 6 F T F F 7 F F T F 8 F F F F  (A or B) and C ABC A(T) T-- A(F) F-- B(T) -T- B(F) -F- C(T) --T C(F) --F ABC(  A(T) TFT(T) A(F) FFT(F) B(T) FTT(T) B(F) FFT(F) C(T) TFT(T) C(F) TFF(F) A(T)C(T) A(F)B(F) ↑
  39.   (MC/DC) !" A B C 1 T T

    T T 2 T T F F 3 T F T T 4 T F F F 5 F T T T 6 F T F F 7 F F T F 8 F F F F # (A or B) and C A B C 3 T F T T 4 T F F F 5 F T T T 7 F F T F  2^3    (N+1)
  40. #,  ' 100%)&? • &%' *"(3>90 /() $/ •<:687580

    /(&3>9,/ •;=4128'-!"%.0$ /(0 +"$ •  ')7,80%.?
  41.  •)3/(02,* 4 -+.)3/  % •-+.)3/ (02,*13.& " 

    #' $ (02,*-+. !
  42. 

  43. &!' • :6142/4%#(! • :6142/4$2/4,?5%,?5+7=1.)(!  "$ 2/4 ($) (!

    ( • ,?5+7=1. • /2?49>4+7=1. • ,>3*-;>+7=1. • 3*-.;>+7=1. • 8<>0+7=1. •  +7=1.(MC/DC)
  44.  • Python •   unittest •  

    Coverage.py
  45.  • ,2.&'%-+.   VERSION 2.3.J02 HTTP://JSTQB.JP/DL/JSTQB-GLOSSARY.V2.3.J02.PDF • ISTQB-+.

    FOUNDATION LEVEL *41+  VERSION 2011.J02 HTTP://JSTQB.JP/DL/JSTQB-SYLLABUSFOUNDATION_VERSION2011.J02.PDF • ISTQB-+. ADVANCED LEVEL *41+  -)0(6-+.%/5+. VERSION2012.J02 HTTP://JSTQB.JP/DL/JSTQB-SYLLABUS.ADVANCED_TTA_VERSION2012.J02.PDF • MC/DC#$ ++3 HTTPS://WWW.ZIPC.COM/CAL/WHITEPAPER/DL/03.PDF • ADVANCED SOFTWARE TESTING - VOL. 3, 2ND EDITION: GUIDE TO THE ISTQB ADVANCED CERTIFICATION AS AN ADVANCED TECHNICAL TEST ANALYST • !" -+. • ,2.&'%-+.