TDDã®åæ¹ä¾åã¨å¾æ¹ä¾å
ã注æã
ãã®è¨äºã«ã¯ééã£ã¦ãããããããªããã¨ãå«ã¾ãã¦ãã¾ãã
ã¾ãå人ã®æè¦ãªã®ã§éµåã¿ã«ããªãããã«ãã¦ãã ããã
ãã¨çå符ãã¤ãã¦ããé¨åã®çãã¯ããã«ã¯æ¸ãã¦ã¾ããã
TDDèªä½ã¯ç°¡åãªæ¦å¿µã¨æã
TDDããèªä½ã¯ç°¡åãªæ¦å¿µã ã
RedãGreenãRefactorâ¦å®ã«ã·ã³ãã«ã§ããã
ã ãããããTDDã¯é£ããã¨ãã話ã¯ãã¨ãããã¨ã«èã(ãããªæ°ããã)
ãã§ã¯ä½ãé£ããã®ã ããï¼ãã¨ããããã§è³å
ã§å¦æ³ãè¨ãã¾ãã¦ã¿ãã
[追è¨]åæ¹ä¾åãå¾æ¹ä¾åã¨ããè¨èãã ãã¦ããããåæã«èããé èªãªã®ã§é
ç®ãã¨ã«å®ç¾©ã追å ãã¦ããã¾ãã
æè¡çãªåæ¹ä¾å
ãTDDãå§ããåã¨çµTDDãå®éããããã«å¿ è¦ãªæè¡ã
- æä½é対象è¨èªã§ã³ã¼ãããããããã«ãªã£ã¦
- æä½éãã¹ãã£ã³ã°ãã¬ã¼ã ã¯ã¼ã¯ã使ããããã«ãªã£ã¦
- ãªãã¡ã¯ã¿ãªã³ã°ããã£ããå¦ãã§
- 対象è¨èªã§ã®ããããªã³ã¼ããè¨è¨ã¨ã¯ä½ããç¥ã£ã¦
- ãã¹ããã¡ã¼ã¹ããç¥ã£ã¦
ãããã¦ããããã¹ã¿ã¼ãã©ã¤ã³ã
æè¡çãªå¾æ¹ä¾å
ãTDDãå¦ãã å¾ã«ã§ã¦ããç¾å®åé¡ã
å¤é¨ä¾åã®ãªããããã¯ã(ãé¡)ã§TDDã®ãµã¤ã¯ã«ãåããããã«ãªã£ãã
- ãã¹ãã¯ã©ãã¾ã§æ¸ãã°ããã®ï¼
- privateãªã¡ã½ããã®ãã¹ãããããã®ã ãã©â¦
- å¤æ´ã®ãã³ã«ãã¹ããå ¨é¨è½ã¡ãâ¦ãã£ã¨å¤æ´ã«èãããããªãã¹ãã«ããã
- ã¨ãããè¨èªã®ç¹æ§ã«ãããã¦æ°æã¡ãããã¹ããæ¸ãããã£ã
- ã©ãããã°ã¹ãã¼ãã¹ãã解決ã§ããï¼
- å¤é¨ä¾åé¨åããã¹ãããããã©â¦TDDã®æ®µéã§ã¯å¤é¨ã«ä¾åããããªããªã
- 並åç³»ã®æ©è½ã¯ï¼
- Viewã¯ï¼
ã¨ããå½¢ã§çåãç©ã¿ããã£ã¦ããã®ããªãã¨ã
ã¹ãã¼ãªã¼çãªåæ¹ä¾å
ãTDDãå§ããåã¾ã§ã®éçºããã»ã¹ã§ä¾åããããªã¹ãã¼ãªã¼ã
- è¦æ±åæãã¦
- ãã¹ãæ¦ç¥ãã¦ã¦
- ãã¹ãè¨è¨ãè¡ã
- 詳細è¨è¨ãã¦
- ã¿ã¹ã¯åå²ãã¦
- TODOãªã¹ããæ¸ãã ãã¦
ããããTDDã
ã¹ãã¼ãªã¼çãªå¾æ¹ä¾å
ãTDDå¾ã«ä¾åããããªã¹ãã¼ãªã¼ã
ã¯ããæ¸ãã¾ãããã£ã¨ããã¨ããã§
- ä»äººã®ã³ã¼ãã¨çµåããæã«ãTDDã®ãã¹ãã§çµåå¾ãåä½ãããç¨åº¦ä¿è¨¼ã§ããããã«ããããã«ã¯ã©ããªãã¹ãã³ã¼ãã«ããã°ããï¼
ã¨ãæ¸ãåºãã¦ã¿ãã¨ããã§
TDDã¨ãã以å¤ã®ãã®ã®ä¾åé¢ä¿ãã»ãã¨ã«ãããªæããªã®ãã¯è°è«ã®æ®ãã¨ããã§ããããã¡ãã£ã¨èããã ãã§ããã ãã§ã¦ããããã ã
ããã¦ãããããè¤éã«ããã¿ãã£ã¦ããã¨ãªãã¨ãTDDãé£ããã¨æãã¦ãã¾ãã®ãä»æ¹ããªãã®ã§ã¯ãªãã§ããã¼ãã
ã¨ãã話ãæ¬å½ã«ãããªã®ãã©ãã4æ5æã§çªãè©°ãããã¨ããã§ããã
ã¨ããããã§çªã£è¾¼ã¿å¤§åéä¸ã§ã*1ã
*1:ããµã«ãªãæããããããã«æ¸ããâ¦ã§ãMã§ã¯ãªã