ãã¡ãã®è¬æ¼æã«ããã ãã質åã¸ã®åçã§ãã
ããã¹ãèªååã¨ãã¹ãé§åéçºãè¬æ¼è³æ - ãã£ã¨ãã§ã½ã
質å5. å®éã«TDDã§éç¨ããã¨ããããã§ãä¸å ·åãçºçãããã¨ãããã¾ããã ãã¼ã¿ã®éã質ãåé¡è¦ããããã¨ãããã¾ããã åãåã£ãæ å ±ã®ä¿¡ææ§ã¯ä¼è©±ããªãã模索ããªãã¨ãããªãã®ã§ãããã
ãã¤ã¦ã¯ãTDDãã¦ããã°ãã¹ãã¯ããã§ååããã以ä¸ã®ãã¹ãã¯ä¸è¦ã¨è¨ããã¦ãããã¨ãããã¾ãããç¾å¨ã¯ãTDDã ãã§å質ã確ä¿ããã®ã¯é£ããããã以ä¸ã®ãã¹ããå¿ è¦ã ã¨è¨ããã¦ãã¾ãã
ãã¹ãé§åéçºã¯ãéçºææ³ã§ããéçºãé§åããããã«ãããã°ã©ãã¼ããã£ã¼ãããã¯ãå¾ãéå ·ã¨ãã¦ãã¹ããæ¸ãã¾ãããã®ãã¹ãã¯ãéçºãé²ããã«ã¯ååã§ãããå質ãæ ä¿ããã«ã¯ä¸ååã§ããã¨ããããä»æ§ãã®ãã®ãææ§ã ã£ãããæãæ¼ãããããããªå ´åããã¹ãé§åéçºã¯ç¡åã§ãã
ãã¤ã¦ãTDDã§ååãã¨è¨ããã¦ããã®ã¯ãããã¯å人çæè¦ã§ãããå½æå®è·µãã¦ããããã°ã©ãã¼ããã¹ãè¨è¨ãã§ãããããªã¹ã¼ãã¼ãã³ã®äººãã¡ã§ãTDDã®ãµã¤ã¯ã«ãå©ç¨ãã¦ãããããªè¦³ç¹ãããã¹ããååã«ã§ãã¦ããããããããã¾ããããã¾æãããä»æ§ã«åé¡ããããããªå ´åã§ããTDDãããªããããã®ä»æ§ãããããªï¼ãã¨æ°ã¥ãã¦ãã客æ§ã«åãåããã§ãã¦ããããããã¾ããã(TDDã«ã¯ä»æ§ã®ä¸åãè¦ã¤ããããå¹æãããã¨ãå人çã«ã¯æãã¦ãã¾ããã誰ã§ãããã ãã§ååã¨ããããã«ã¯ããã¾ããã)
ããããããã§ãããæå³è³æ¥µå½ç¶ã§ãããTDDã«ããéçºã¨ã¯å¥ã«ãã¹ãããããã¨ã«ãªãã¾ãããã®ããã¹ãããããã¯ãæåãã¹ãã¨ããã¹ãã追å ã§èªååãã両æ¹ãå«ã¿ã¾ããä»æ§æ¸ãã¬ãã¥ã¼ãã¦ãã¹ãè¨è¨ãããæ´»åãéçºã¨ä¸¦è¡ãã¦é²ããããéçºã§ãããã®ã触ããªãããã¹ãããããéçºå®äºåã«èªååãããã¹ããæºåãããããã¼ã ãããã¸ã§ã¯ãã®ãã¹ãè¨ç»ããã¨ããæ´»åã«ãªãã¾ãã
ã©ããªãã¹ãã足ããªãã
ã¾ãTDDã§æ¸ãã®ã¯ã¦ããããã¹ããã³ã³ãã¼ãã³ããã¹ãã«å½ããã®ãã»ã¨ãã©ã§ãããã以å¤ã®ãã¹ããçµ±åãã¹ããã·ã¹ãã ãã¹ããªã©ã¯ãä»ã®ã¢ããã¼ããå¿ è¦ã§ããã¾ãã¦ããããã¹ãã§ããTDDã ãã§ã¯ãã¹ã観ç¹ã足ãã¦ããªãã®ã§ãããããã¦è¿½å ã®ã¦ããããã¹ããããå¿ è¦ãããã¾ããTDDãã¦ãããªãã追å ãèªååããã®ãèªç¶ã§ãããã
TDD以å¤ã§ãã¹ããèªååãããã¨ãã対æ¯ãã¦QAãã¹ãã¨å¼ã¶ãã¨ãããã¾ã(ãã£ã¨åºãæ´»åãæãã¦QAãã¹ãã¨å¼ã¶ã»ããä¸è¬çã ã¨æãã¾ããããã§ã¯èª¬æã®ãããTDDå¾ã®ãã¹ãèªååãQAãã¹ãã¨å¼ã³ã¾ã)ãTDDã§ã¯éçºãé§åããããã®ãã¹ããæ¸ãã¾ããããQAãã¹ãã§ã¯å質ãä¿è¨¼ããããã®ãã¹ããæ¸ãã¾ãããã®éç¨ã§ã¯TDDã§æ¸ãããã¹ããå©ç¨ããã¾ãããã¾ãæ´çãåæ§æ(ãªãã¡ã¯ã¿ãªã³ã°)ã®å¯¾è±¡ã«ããªãã¾ããQA観ç¹ã§ã¯ãã¹ãã足ããªãå ´åãããã°ãéå°ãªãã¨ããããã¾ããã¹ãã®ä½ç½®ã¥ããå¤ããã»ããç解ããããã£ããããã¾ãã
ãã¡ãテストを書くか書かないかの判断の話 · GitHubã§ã¯ãã®ããã«è¿°ã¹ããã¦ãã¾ãããã®æ¹ã¯ãTDDã®ãµã¤ã¯ã«ãå©ç¨ãã¦ãããããªè¦³ç¹ãããã¹ããååã«ã§ããããã«æãã¾ãã
ããç¨åº¦å®è£ ãåºã¾ããããã§ãããã¨å å¿æããã¿ã¤ãã³ã°ããã¹ãã±ã¼ã¹ã®ç¶²ç¾ çãä¸ããã¿ã¤ãã³ã°ã§ããããã§ã¯ TDD ã®ãã¹ãã§ã¯ãªããQA (å質ä¿è¨¼) ã¨ãã¦ã®ãã¹ãã®è¦³ç¹ã«èªåã®é ãåãæ¿ãã¾ããããã§åãã¦ãåå¤åå²ãå¢çå¤åæã«ããåæ©è½ã®ãã¹ãè¨è¨ããã¾ã (ã¨ãã«ç¡å¹åå¤ã¯ã©ã¹ã«åé¡ãããç°å¸¸ç³»ã®å¦çã®ããã®ãã¹ããå å®ããããã¨ãå¤ãã§ã)ã
ãã¡ãTDDのテスト vs. QAのための単体テスト について考えてみた - What is it, naokirin?ã§ã¯ãTDDã§æ¸ããã¹ãã¨ãQAã®ããã®åä½ãã¹ãã®éãã«ã¤ãã¦èå¯ããã¦ãã¾ãã
TDDã®ãã¹ã | åä½ãã¹ã |
---|---|
ã³ã¼ãã£ã³ã°ã®ãã | å質(ä¿è¨¼)ã®ãã |
éçºä¿é²ã®ãã | æ¬ é¥ãåãé¤ããã |
ãªãã¡ã¯ã¿ãªã³ã°ã®ãã | å質確èªã®ãã |
ãã¹ããã¡ã¼ã¹ãã§è¡ã | ã³ã¼ãã£ã³ã°å¾ã«è¡ã |
詳細è¨è¨ã«ãããã¹ã | åä½ãã¹ãè¨è¨ã«ãããã¹ã |
è¨è¨ææ³ã¨ãã¦ã®ãã¹ã | æ¤è¨¼ã¨å¦¥å½æ§ç¢ºèªã®ããã®ãã¹ã |
éçºè ãå³åº§ã«ãã£ã¼ãããã¯ãå¾ããã | |
ããã°ã©ãã®ããã®ãã¹ã | |
ä¸è§æ¸¬é |
ãã¡ãJaSST'12 TokyoのTDDセッションとWACATEセッションに登壇 - 千里霧中ã§ã¯ãgoyokiããã2012å¹´ã®JaSST(ã½ããã¦ã§ã¢ãã¹ãã·ã³ãã¸ã¦ã )ã§ã®VOTDD(æ¤è¨¼æåTDD)ã§ãTDDã®ãµã¤ã¯ã«ã«æ¤è¨¼æå(å質ä¿è¨¼ã®ã²ã¨ã¤ã®è¦³ç¹)ãå«ããããæ¹ã«ã¤ãã¦ãçºè¡¨ã¨ãã¢ãããã¦ãã¾ããçºè¡¨ã¹ã©ã¤ãã表示ãããªãå ´åãããããã§ããããã¼ã¸å ã®ãªã³ã¯ããã¢ã¯ã»ã¹ã§ãã¾ãã
è³æã®æå¾ã®æ¹ã«ãVOTDDã®å®ç¾©ãã®è§£èª¬ãã¼ã¸ã追å ãã¦ãã¾ãã詳細ã¯ãããåç §ãã¦é ãã¨ãã¦ãé常ã«ç°¡ç¥åãã¦è¨ãã¨ãTDDã§ããã¹ãã«ã¤ãã¦ãã£ã¨æ°ãã¤ããã°è²ã è¯ããã¨ãããã¨ããã®ãVOTDDã§ãã
TDDã§ã©ã®ããããã¹ããæ¸ãããQAãã¹ããã©ã®ããã追å ããããªãã¡ã¯ã¿ãªã³ã°ããããããã¯ããããã¯ããçµç¹ã«ãã£ã¦ããããã§ããæ°ã«ãªãã¨ãããã¡ãã£ã¨è¿½å ããç¨åº¦ãããä½åãã®ãã¹ããæ¸ã足ãã¨ãããããã¾ããããã¯å質ä¿è¨¼ã®æ¦ç¥ã¨ããã®ä¸ã§ã®ãã¹ãèªååã®ä½ç½®ã¥ãã«é¢ãã£ã¦ããã大ããªãã¼ãã®ä¸é¨ã§ããããç§ãç´¹ä»ã§ããç¯å²ãè¶ ãã¦ãã¾ãã
èªåãªãã©ãããã(TDDã¨ç´æ¥é¢ä¿ãªãè£è¶³)
å ã®è³ªåã«æ»ã£ã¦ããã¼ã¿ã¨ããã®ã¯ã·ã¹ãã ã¸ã®å ¥åãã¼ã¿ã§ããã¹ãã§ä½¿ã£ããã¼ã¿ãä¸ååã ã£ãããæ¤è¨ä¸è¶³ã ã£ãã¨ããç¶æ³ããªã¨æ³åãã¾ãããå人çãªçµé¨ãè¸ã¾ãã¦èãã¦ã¿ã¾ããã客æ§ããããããå ¥åãã¼ã¿ã ãããã¨ãã¼ã¿ãã©ã¼ãããããã¹ããã¼ã¿ãåãåã£ãå ´åã¯ã
- æ¬ç©(æ¬çªãã¼ã¿)ã¨ãå¿ ãã©ããéã
- ã0ã1ã ããã¨ããã¦ãããã£ã¼ã«ãã«2ãå ¥ããããªãã¨ããæä½1ç®æã¯ãã
- æ¬çªã§æ³å®ãã件æ°(ãã¼ã¿é)ãæ±ãã¨ããªã«ãåé¡ãèµ·ãã
- ããå¾ãªãçç¾ãããã¼ã¿ãæ¬çªã§ã¯æ¥ã(åå¨ããªããã¼ã¿ã®æ´æ°å·®åã¨ããæç´°ã0件ã®ãªã¼ãã¼ã¨ã)
- ããããæçµçã§ããã¨ãããã¼ã¸ã§ã³ãæ¥ã¦ãããã¾ãæ°ãããã¼ã¸ã§ã³ãå±ã
ãããããã¨ãããã¨æ³å®ãã¾ããæ³å®ããä¸ã§ãéçºã¨ä¸¦è¡ãã¦ã©ããªãã¹ãã±ã¼ã¹ãå¿ è¦ãèãã¤ã¤ãèªåãã¡ã§ä½¿ããã¹ããã¼ã¿ãä½ãã¾ããããã§ä½ã£ããã¹ããã¼ã¿ã¯ãå ´åã«ãã£ã¦ã¯ããã¹ãé§åéçºã®ãµã¤ã¯ã«ã§ä½¿ããã¼ã¿ã«ãããã¨ãããã¾ãããã¨ã§æåã§æµãç¨ã«ãããã¨ãããã¾ããæ¬çªç°å¢ã®å®ãã¼ã¿ã¨æ¯è¼ãã¦ãã©ããæ³å®ã¨éã£ãã調ã¹ãææã«ã使ãã¾ãã
ã½ããã¦ã§ã¢ã®æ§è³ªã«ãããã¾ãããå¥ã·ã¹ãã ããåãåããã¼ã¿ã¯ãå¾ä½ã®ç¥ããªããããã®ãã¨æã£ã¦ãå®è¡æã®ããªãã¼ã·ã§ã³(å ¥åãã§ãã¯ããã©ã¼ããããã§ãã¯ãæ´åæ§ãã§ãã¯)ãããã¾ã(ããã¯fail fastã®ã¢ããã¼ãã§ãããã¾ã)ãã客æ§ã®ãã¨ã¯ä¿¡é ¼ãã¦ããã客æ§ãéç¨ãã¦ããã·ã¹ãã ã¯ä¿¡ç¨ããªãã¨ããããã§ããããªãã¼ã·ã§ã³å¦çã®éçºã¯ãããããæ³ååãè¨ãã¾ããªããç°å¸¸ãªãã¿ã¼ã³ãèãã¦è¨è¨ãã¾ããTDDã®ãµã¤ã¯ã«ã§ãæ°ããªå¯è½æ§ã«æ°ã¥ãã¦ãã¿ã¼ã³ãè£å ãããããã¾ãã
ç¾å®ã¨ãã¦ä¸å ·åãçºçãã¦ãã¾ã£ãããããèªä½ã¯ä»æ¹ããªãã®ã§å¯¾å¿ãã¾ããå¯è½ãªéããä¸å ·åãåç¾ãããã¹ã(ãã¼ã¿ãå«ã)ãå¿ ãæ¸ãã¾ã(TDDãããã§ãªãã¦ã)ããã¹ããæ¸ããä¸ã§ä¿®æ£ãããã¨ããé çªã§ãã ããã²ã¨ã¤ãä¸å ·åãã©ããã¦çºçãã¦ãã¾ã£ãã®ãåæããã®ã大äºã§ãããã¹ãæ¼ãã ã¨ãªã£ãããæ¢åã®ãã¹ããè¦ç´ãã¦æ¼ãããã£ãã追å ãã¦èªååãã¾ããããã§æ°ãã«(æªçºçã®)ã¨ã©ã¼ãè¦ã¤ããããããããã¾ãããã³ãã¥ãã±ã¼ã·ã§ã³ã®æ¹åãå¿ è¦ã§ããã°ãããããæ½çãæã¡ã¾ããQAãã¼ã ããããåæã¨å¯¾çã®æ´»åã主å°ãã¦ãããã¯ãã§ãã