ããã°ã©ãã³ã°ã®äžçã§ã¯ãå質ã®é«ããœãããŠã§ã¢ãè¿ éã«æäŸããããšãããžãã¹æåã®éµã§ããä»åã®ããŒãã¯ãChatGPTã®äººå·¥ç¥èœã掻çšããJUnitãã¹ãã®å¹çåã«çŠç¹ãåœãŠãŸãããã®å 容ã§ã¯ããã¹ãé§åéçºã®å°å ¥ã®ä»æ¹ãChatGPTãšJUnitãèåãããæã®ã¡ãªããããããŠè¯è³ªãªãã¹ãæŠç¥ã®å®è·µæ¹æ³ã«ã€ããŠãããžãã¹ããŒãœã³ã«ãç解ãããã圢ã§åãããããèŠçŽããŠãããŸããéçºã®è³ªãäžããä¿å®ã®å¹çãé«ããããã®å®çšçãªãã¯ããã¯ã身ã«ä»ããŸãããã
1. ChatGPT JUnit ããã°ã©ãã³ã°ãšã¯ïŒ
ChatGPT JUnit ããã°ã©ãã³ã°ãšã¯ãJavaã§æžãããã¢ããªã±ãŒã·ã§ã³ããœãããŠã§ã¢ã³ã³ããŒãã³ãã®ãã¹ãèªååãè¡ãéã«ãJUnitãã¹ãã£ã³ã°ãã¬ãŒã ã¯ãŒã¯ãçšããããã°ã©ãã³ã°ææ³ã§ããããã«ããã人工ç¥èœã®ChatGPTã掻çšããŠéçºããã»ã¹ãæ¹åããããå¹ççãªãœãããŠã§ã¢éçºãç®æãããšãã§ããŸãã
éçºè ã¯ãã®ææ³ã䜿çšããŠãã³ãŒãã®æ£ç¢ºæ§ãæ ä¿ããæ©èœãæåŸ ããåäœããããã©ããã確èªããŸããäžæ¹ãChatGPTãå©çšãããšããã¹ãã±ãŒã¹ã®çæããããã°äœæ¥ã容æã«ãªãã人éã®ä»å ¥ãæžãããªããé«åºŠãªãã¹ãææ³ãæ¡çšããããšãã§ããŸãã
ãã®èšäºã§ã¯ãJUnitã®åºæ¬ãšChatGPTã®èœåãäž¡è ãçµã¿åãããããšã§åŸãããå©ç¹ã«ã€ããŠè§£èª¬ããŸããå質ã®é«ããœãããŠã§ã¢ãå¹ççã«éçºããããã«å¿ èŠãªæ å ±ãæäŸããŸãã®ã§ããã²åèã«ããŠãã ããã
1.1 JUnitãšã¯ïŒåºæ¬çãªãã¹ãé§åéçº(TDD)
JUnitã¯Javaèšèªã®ããã®ãã¹ããã¬ãŒã ã¯ãŒã¯ã§ããããã¹ãé§åéçº(TDD)ã®ææ³ã«åºã¥ããéçºããã»ã¹ããµããŒãããŠããŸããTDDã¯ãŸããã¹ãã±ãŒã¹ãå®çŸ©ãããã®ãã¹ããééããããã«ã³ãŒããå®è£ ãããšããã¢ãããŒããåããŸãã
JUnitãçšããããšã§ãåäœãã¹ãã¯ãã¡ããã®ããšããã倧èŠæš¡ãªçµ±åãã¹ãããªã°ã¬ãã·ã§ã³ãã¹ããªã©ãæ§ã ãªæ®µéã®ãã¹ããèªååãããããªããŸããããã¯ãç¹°ãè¿ãè¡ããããã¹ãäœæ¥ã®è² æ ã軜æžããéçºå¹çãé£èºçã«åäžãããŸãã
ãŸããJUnitã¯ãã¹ãã®çµæãæ確ã«å ±åããæåãããã¹ããšå€±æãããã¹ãã容æã«åºå¥ããããšãã§ããã®ã§ããããã°äœæ¥ãéåžžã«æ軜ã«ãªããŸãã现éšã«ããããã¹ãçµæã®è§£æãå¯èœã§ããããããœãããŠã§ã¢ã®å質ãäžè²«ããŠé«ããããšãã§ããŸãã
1.2 ChatGPTã®æŠèŠãšãã®ã€ã³ããªãžã§ã³ã¹
ChatGPTã¯ãèªç¶èšèªåŠç(NLP)ãé§äœ¿ããé«åºŠãªäººå·¥ç¥èœã§ãããèšèªã¢ãã«ãçšããŠäººéãããããã¹ããçæããèœåãæã¡ãŸããããã«ããããŠãŒã¶ãŒãšã®å¯Ÿè©±ã質åã«å¯Ÿããå¿çããããã¯ã³ãŒãã£ã³ã°ã«é¢é£ããã¢ããã€ã¹ãªã©ãå€å²ã«ãããã¿ã¹ã¯ãããªãããšãå¯èœã§ãã
ChatGPTãæã€ã€ã³ããªãžã§ã³ã¹ã¯ããã¹ãããã»ã¹ã«ãããŠã掻çšããããšãã§ããŸããã³ãŒãã£ã³ã°ã®ã¬ã€ãã³ã¹ããããã¹ãã±ãŒã¹ã®ææ¡ãããã«ã¯ã³ãŒãã®è§£æãŸã§ãChatGPTã¯ãœãããŠã§ã¢éçºã«ãããå€æ§ãªåœ¹å²ãæããããšãã§ããŸãã
ãããŠãChatGPTã®é«åºŠãªç解èœåãšçæèœåã¯ããã¹ãèªååããŒã«ã§ããJUnitãšçµã¿åãããããšã§ããã®ç䟡ãçºæ®ããŸãããã¹ãã³ãŒãã®å質ãåäžããããããã¹ãããã»ã¹ãå¹çåãããªã©ãéçºãµã€ã¯ã«å šäœã«è²¢ç®ãããå¯èœæ§ãç§ããŠããŸãã
1.3 ããã°ã©ãã³ã°ã«JUnitãåãå ¥ããã¡ãªãã
JUnitãããã°ã©ãã³ã°ã«åãå ¥ããæ倧ã®ã¡ãªããã¯ããœãããŠã§ã¢ã®ãã°ãæ©æã«æ€åºããä¿®æ£ããããšãã§ããç¹ã«ãããŸããé«å質ãªãœãããŠã§ã¢ãéããã«ãªãªãŒã¹ãããéçºããŒã ã«ãšã£ãŠã¯ãJUnitãéåžžã«äŸ¡å€ã®é«ãããŒã«ã§ãã
èªååããããã¹ãã¯ãæåãã¹ãã«æ¯ã¹ãŠè¿ éãã€ç¹°ãè¿ãå®è¡ãå¯èœãªã®ã§ãéçºã®å段éã§ã®ã³ãŒãå€æŽã«è¿œåŸãããããªããŸãããã®ããšããããªãã¡ã¯ã¿ãªã³ã°ãæ©èœã®è¿œå ãé »ç¹ã«è¡ãããã¢ãžã£ã€ã«éçºã«ãããŠãé©ããŠããŸãã
ããã«ãJUnitã¯ã³ãŒãã®ã«ãã¬ããžãåäžãããããšãã§ããèŠéããããã¡ãªãšããžã±ãŒã¹ã«å¯Ÿãããã¹ãã確å®ã«è¡ãããããæå³ããªãåé¡ãé²æ¢ããäžã§æå¹ã§ããçµæãšããŠããœãããŠã§ã¢ã®å®å®æ§ãé«ãŸãããŠãŒã¶ãŒã«ãšã£ãŠä¿¡é Œæ§ã®ãã補åãæäŸããããšãå¯èœã«ãªããŸãã
1.4 ChatGPTãšJUnitã®çµ±åã®å©ç¹
ChatGPTãšJUnitã®çµ±åã¯ãéçºããã»ã¹ãå€§å¹ ã«æ¹åã§ããå©ç¹ããããããŸããChatGPTã¯ãããããã¹ãã·ããªãªãèæ ®ãããã¹ãã±ãŒã¹ãç¬æã«ææ¡ã§ãããããJUnitã®ãã¹ãèªååãããã«åŒ·åã§ããŸãã
äŸãã°ãChatGPTã¯æ¢åã³ãŒãããŒã¹ã«åºã¥ããŠæœåšçãªãªã¹ã¯ãç¹å®ããé¢é£ããåäœãã¹ããäœæããããšã§ãJUnitã«ãããã¹ãã«ãã¬ããžãæ¡å€§ããŸããããã¯éçºè ãèŠèœãšããã¡ãªåé¡ã«å¯ŸããŠã察å¿ãå¯èœã«ããããå®å šãªã³ãŒããäœãäžããŸãã
ãŸããChatGPTã¯ãã¹ãã®èšè¿°ããããã°æ å ±ã®è§£æã«ã圹ç«ã¡ãŸããè€éãªãœãããŠã§ã¢ã·ã¹ãã ã®äžã§ãå¹ççã«ãã¹ããè¡ããè¿ éã«åé¡ãä¿®æ£ããããšã¯ããœãããŠã§ã¢éçºã®ãµã€ã¯ã«ã¿ã€ã ãççž®ããåžå Žãžã®å°å ¥ãå éãããéµãšãªããŸãã
2. JUnitã§ã®ãã¹ãã±ãŒã¹äœæã®åºæ¬
ããã°ã©ãã³ã°ã®äžçã§ã¯ãã³ãŒããä»æ§ã«æ²¿ã£ãŠæ£ããåäœããŠããããšãä¿èšŒããããã«ãã¹ãã£ã³ã°ã極ããŠéèŠã§ããJUnitã¯Javaèšèªã«ããããã¹ããã¬ãŒã ã¯ãŒã¯ã®ããã¡ã¯ãã¹ã¿ã³ããŒããšããŠåºãæ¡çšãããŠãããå¹ççãªãã¹ãã±ãŒã¹ã®äœæãæ¯æŽããŸãããã®èšäºã§ã¯ãJUnitãçšãããã¹ãã±ãŒã¹ã®äœæã«ã€ããŠãåå¿è ããäžçŽè åãã®ç¥èã詳现ã«è§£èª¬ããŸãã
ãã¹ãã±ãŒã¹ãäœæããããã§æãéèŠãªã¹ãããã¯ããã¹ã察象ã®ã³ãŒããæåŸ ããçµæãåºåãããã©ãããæ€èšŒããããšã§ãããã®ãšãã«JUnitã§ã¯ãã¢ãµãŒã·ã§ã³ããšåŒã°ããæ©èœãçšããŠæ€èšŒãè¡ããŸããã¢ãµãŒã·ã§ã³ãé©åã«äœ¿çšããããšã§ãã³ãŒãã®ä¿¡é Œæ§ãåäžãããå°æ¥çãªå€æŽã«å¯Ÿããå®å®æ§ãä¿ã€ããšãã§ããŸãã
äžããããä»æ§ãå®è£ ãããŠããããå€æããããã«ãåäœãã¹ããšããŠç¹å®ã®æ©èœãã¡ãœãããæ£ããåäœãããã確èªããŸãããã®ä»ã®ãã¹ããšããŠçµ±åãã¹ããã·ã¹ãã ãã¹ããååšããŸãããJUnitã¯äž»ã«åäœãã¹ãã®äœæã«ç¹åãããã¬ãŒã ã¯ãŒã¯ã§ããéçºã®åæ段éã§ãã¹ãã±ãŒã¹ãäœæããç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³ã®äžç°ãšããŠéçšããããšã§ãå¹ççãã€ç¶ç¶çãªå質åäžãéããããšãã§ããŸãã
2.1 ãã¹ãã±ãŒã¹ãšã¢ãµãŒã·ã§ã³ã®äœææ¹æ³
ãã¹ãã±ãŒã¹ãäœæããéã«ã¯ããŸããã¹ã察象ã®ã¡ãœãããã¯ã©ã¹ãç¹å®ããã©ã®ãããªæ¡ä»¶ã§ãã¹ããè¡ããã決å®ããŸããJUnitã§ã¯ã¡ãœããäžã«@Testã¢ãããŒã·ã§ã³ãä»äžããããšã§ããã®ã¡ãœããããã¹ãã¡ãœããã§ããããšã瀺ããŸããããã«ããããã¹ãã©ã³ããŒãèªåã§ãã¹ãã¡ãœãããèªèããå®è¡ãè¡ããŸãã
ã¢ãµãŒã·ã§ã³ã¯ãã¹ãçµæã®æ€èšŒã«äœ¿çšããæåŸ ãããå€ãšãã¹ã察象ãè¿ãå€ãæ¯èŒããŸããJUnitã«ã¯å€ãã®ã¢ãµãŒã·ã§ã³ã¡ãœãããååšããassertEquals, assertTrue, assertArrayEqualsãªã©ãæ¡ä»¶ã«å¿ããŠé©åãªã¡ãœãããéžæããŸããã¢ãµãŒã·ã§ã³ã®å€±æã¯ãã¹ãã®å€±æãšã¿ãªããããã¹ãã¬ããŒãã§è©³çŽ°ãªå€±æçç±ãšå ±ã«å ±åãããããããããã°ã®ææãããšãªããŸãã
ãã¹ãé§åéçºïŒTDDïŒã®å®è·µã«ãããŠã¯ããŸãã¢ãµãŒã·ã§ã³ããæžãå§ããããšã奚å±ãããŸããããããããšã§ããã¹ã察象ã®ã³ãŒããæçµçã«éæãã¹ãä»æ§ãå ã«å®çŸ©ãããã®åŸã§å®è£ ãè¡ãããšãã§ããçµæãšããŠèšèšã®æ¹åã«ç¹ãããŸãã
2.2 ãã¹ããã£ã¯ã¹ãã£ã®å©çšãšãã®éèŠæ§
ãã¹ããã£ã¯ã¹ãã£ãšã¯ããã¹ãã¡ãœããã®å®è¡åã«å¿ èŠãªç¶æ ãã»ããã¢ãããããã¹ãã¡ãœããã®å®è¡åŸã«ãªãœãŒã¹ãé©åã«ã¯ãªãŒã³ã¢ããããããã®ä»çµã¿ã§ããJUnitã§ã¯@Beforeã@Afterã®ãããªã¢ãããŒã·ã§ã³ã䜿ã£ãŠããã£ã¯ã¹ãã£ã®ä»çµã¿ãç°¡åã«å©çšããããšãã§ããŸãã
äŸãã°ãããŒã¿ããŒã¹ãšã®æ¥ç¶ã䌎ããã¹ãã§ã¯ãåãã¹ãã¡ãœããã®å®è¡åã«ããŒã¿ããŒã¹ãžã®æ¥ç¶ã確ç«ããå®è¡åŸã«ã¯ãã®æ¥ç¶ãéããåŠçãå¿ èŠãšãªããŸãããã®ããã«ãäžé£ã®ãã¹ããéããŠç¹°ãè¿ã䜿çšãããåæåãåŸçä»ãã®åŠçãé©åã«ç®¡çããããšã§ããã¹ãã³ãŒãã®å¯èªæ§ãšä¿å®æ§ãé«ããããšãã§ããŸãã
ãã¹ããã£ã¯ã¹ãã£ã¯ãã¹ãã®ä¿¡é Œæ§ãé«ããäžã§ãéèŠãªåœ¹å²ãæãããŸããåãã¹ãã¡ãœãããç¬ç«ããŠåäœããä»ã®ãã¹ãã¡ãœããã®å®è¡çµæã«åœ±é¿ãããªãããã«ãé©åãªãã£ã¯ã¹ãã£ã®ç®¡çãæ±ããããŸãããã®ãã©ã¯ãã£ã¹ã«ããããã¹ãçµæã®äºæž¬å¯èœæ§ãšåçŸæ§ãåäžãããããšãå¯èœã«ãªããŸãã
2.3 ãã¹ãã®éå±€åãšçµç¹åã®ãã¯ããã¯
JUnitãçšãããã¹ããæ§ç¯ããéã«ã¯ããã¹ãã±ãŒã¹ã®éå±€åãšçµç¹åãéåžžã«éèŠã§ãããã¹ãã±ãŒã¹ãé©åã«æ§é åããããšã§ãã³ãŒãã®å¯èªæ§ãé«ãããã¹ãã®ä¿å®æ§ãšæ¡åŒµæ§ãåäžãããããšãã§ããŸããäžè¬çãªãã¯ããã¯ãšããŠãé¢é£ãããã¹ãã±ãŒã¹ãã°ã«ãŒãã³ã°ãããã¹ãã®ã¹ã³ãŒãã«å¿ããŠã¯ã©ã¹ãããã±ãŒãžãåããæ¹æ³ããããŸãã
äŸãšããŠããŠãŒã¶ãŒèªèšŒæ©èœãæ åœããã¯ã©ã¹ã®ãã¹ãã®å Žåããã°ã€ã³æ©èœã®ãã¹ãããã¹ã¯ãŒããªã»ããæ©èœã®ãã¹ããªã©ãæ©èœããšã«ãã¹ãã¯ã©ã¹ãåå²ããããã«ããããèªèšŒé¢é£ã®ãã¹ãããŸãšããããã±ãŒãžã«é 眮ããããšãèããããŸãããã®éå±€åã«ããããã¹ãã®ç®çãã«ããŒããŠããç¯å²ãæ確ã«ãªããæ°ããªãã¹ãã±ãŒã¹ã®è¿œå æã«ãåé¡ã容æã«ãªããŸãã
ãŸãããã©ã¡ãŒã¿åããããã¹ããçšããããšã§éè€ãããã¹ãã³ãŒãã®æé€ãå¯èœã§ããç°ãªãå ¥åå€ãäºåæ¡ä»¶ã§åãè«çããã¹ãããå¿ èŠãããå ŽåãJUnitã®Parametrized Testsæ©èœã䜿ã£ãŠè€æ°ã®ãã¹ãã±ãŒã¹ãç°¡æœã«è¡šçŸã§ããŸããããã«ããããã¹ãã±ãŒã¹ã®ç¶²çŸ æ§ãé«ãã€ã€ãã³ãŒãã®ç°¡æœããä¿ã€ããšãã§ããŸãã
2.4 ãã¹ãã¬ããŒãã®çæãšå¯èŠå
ãã¹ãããã»ã¹ã«ãããŠããã¹ãã¬ããŒãã®çæãšå¯èŠåã¯éèŠãªåœ¹å²ãæãããŸãããã¹ãã¬ããŒããéããŠãã¹ãã®çµæãææ¡ããåé¡ãçºçããŠããç®æãç¹å®ããããšãéèŠã§ããJUnitã§ã¯ãMavenãGradleã®ãããªãã«ãããŒã«ãé£æºãããããšã§ã詳现ãªãã¹ãã¬ããŒããçæã§ããŸãã
JUnitã®æšæºã®ãã¹ãã©ã³ããŒã¯ããã¹ãã®æåã倱æãã¹ãããããããã¹ãã®æ°ãšãã£ãåºæ¬çãªæ å ±ãæäŸããŸãããè¿œå ããŒã«ããã©ã°ã€ã³ã掻çšããããšã§ãããæŽç·Žãããã¬ããŒããäœæããããšãå¯èœã§ãããããã®ã¬ããŒãã¯HTML圢åŒã§åºåãããããšãå€ãããã©ãŠã¶ãéããŠåãããããçµæã確èªã§ããŸãã
CIïŒç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³ïŒããŒã«ãšã®çµã¿åããã«ãããåãã«ãã§ã®ãã¹ãçµæãå¯èŠåããããšãã§ããŸããäŸãã°ãJenkinsã䜿çšããŠããå ŽåãJUnitãã©ã°ã€ã³ãè¿œå ããããšã§ããã¹ãçµæãããã·ã¥ããŒãã§èŠèŠçã«åæã§ããéçºããŒã å šäœã§ãã¹ãç¶æ³ã®å ±æã»ç®¡çã容æã«ãªããŸãã
3. ChatGPTãçšããããã°ã©ã çæã®æŽ»çšæ¹æ³
ããã°ã©ã çæã§ã¯ãAIæè¡ãé§äœ¿ããŠã³ãŒãã®èªåçæãæ¹åãè¡ããŸããChatGPTã¯ãã®ãããªçšéã«ãããŠéåžžã«æå¹ãªããŒã«ã§ãããããã°ã©ããŒãã¡ã¯ãã®æœåšèœåãåŒãåºãããšã§äœæ¥ã®å¹çåãå³ããŸãã
ChatGPTã䜿çšããŠããã°ã©ãã³ã°ããéã¯ããŸãã¯å ·äœçãªèŠä»¶ãå®è£ ãããæ©èœãæ確ã«ããŠããããšãéèŠã§ãããã®ããã§ãChatGPTã«ãããã®æ å ±ããã£ãŒãããæé©ãªã³ãŒãã®ææ¡ãåããã®ã§ãã
ãã®æè¡ã¯ãæ°ãããããžã§ã¯ããã¹ã¿ãŒãããéããæ¢åã®ã³ãŒãããŒã¹ã«ãããŠæ¹åãå³ãããå Žåã«ã圹ç«ã¡ãŸãããŸããåŠç¿ç®çã§ã³ãŒãã®äŸã解説ãæ±ããå Žåã«ã䜿çšã§ããŸãã
3.1 ChatGPTãå©çšããã³ãŒãçæã®æµã
ã³ãŒãçæã®ããã»ã¹ã¯ãããã°ã©ããŒãChatGPTã«å¯ŸããŠèŠæ±ãæåºããããšããå§ãŸããŸããããã¯ãç¹å®ã®ããã°ã©ã æ©èœã«é¢ããç°¡æœãªèª¬æãã解決ãããããã°ã©ã äžã®åé¡ãšãã£ã圢ã§ããããšãå€ãã§ãã
次ã«ãChatGPTã¯æäŸãããæ å ±ã解æããèŠæ±ã«å¿ããã³ãŒãã¹ãããããçæããŸãããã®éãChatGPTã¯éåžžã«å€æ§ãªããã°ã©ãã³ã°èšèªã«å¯Ÿå¿ã§ãããããèšèªã«å¿ããé©åãªã³ãŒããæäŸããããã§ãã
ãããŠãçæãããã³ãŒãã¯ããŠãŒã¶ãŒã«ãã£ãŠã¬ãã¥ãŒãããé©å®ã«ã¹ã¿ãã€ãºãè¡ãããŸãããã®ã¹ãããã¯ãAIã«ããèªåçæã³ãŒããšå®éã®ãããã¯ãç°å¢ãšã®éã®ã®ã£ãããåããå質ãä¿èšŒããããã«äžå¯æ¬ ã§ãã
3.2 èªç¶èšèªåŠçãçšããåœä»€ãšã³ãŒãã£ã³ã°
ChatGPTã®èåŸã«ããèªç¶èšèªåŠçïŒNLPïŒèœåã«ãã£ãŠãããã°ã©ããŒã¯éæè¡çãªèšèã§ãã³ãŒãçæãäŸé Œã§ããŸããããã«ãããã¢ã€ãã¢ããã°ããã³ãŒãã«å€æããããšãå¯èœãšãªããŸãã
NLPã¯ãããã°ã©ããŒãäžè¬çãªèšèªã§è¡šçŸããèŠä»¶ãç解ããããã«åºã¥ããŠããã°ã©ãã³ã°èšèªã§ã®é©åãªæ瀺ã圢æããŸããããã«ãããæè¡çç¥èãæµ ã人ã ã§ãããã°ã©ã ã«å¯Ÿããç解ãæ·±ããããŸãã
ãã®ããã»ã¹ã§ã¯ãããã°ã©ããŒãšChatGPTã®éã§ç¶ç¶çãªå¯Ÿè©±ãè¡ãããèŠä»¶ã®ç²ŸåºŠãäžããŠããããšãã§ããŸããçµæãæŽã«æŽç·Žãããã³ãŒããçæãããã®ã§ãã
3.3 ChatGPTã«ããã³ãŒãã¹ããããã®æé©å
AIã䜿ãã°ãã³ãŒãã®å質ãåäžãããããšã容æã«ãªããŸããChatGPTã¯ãããã°ã©ã ã®å¹çæ§ãå®è¡é床ãã¡ã¢ãªäœ¿çšéãšãã£ãé¢ã§ã³ãŒããæé©åããææ¡ãè¡ãããšãã§ããŸãã
ããã«ãChatGPTã¯ããã°ã©ã ã®ã»ãã¥ãªãã£é¢ã§ãã¢ããã€ã¹ãæäŸããããšãå¯èœã§ããããšãã°è匱æ§ã®ããã³ãŒãã»ã¯ã·ã§ã³ãåå®ããããå ç¢ãªä»£æ¿æ段ãæäŸããããšãã§ããŸãã
ã³ãŒãã¹ããããã®æé©åã¯ãç¹ã«å€§èŠæš¡ãªãããžã§ã¯ããæéãéãããŠããéã«äŸ¡å€ããããŸããããã«ãããæåã§ã®ã³ãŒãã¬ãã¥ãŒããªãã¡ã¯ã¿ãªã³ã°ã«ãããæéãåæžããªãããå šäœã®ã³ãŒãããŒã¹ãæ¹åã§ããŸãã
3.4 Deep Learningã掻çšããããã°ã©ã ã®èªåä¿®æ£
ããã°ã©ã ã®ãã°ãç¹å®ããä¿®æ£ããã®ã¯æéã®ãããäœæ¥ã§ããããããChatGPTã掻çšããããšã§ããã°ã®æ€åºãšä¿®æ£ãå¹ççã«è¡ãããšãã§ããŸããç¹ã«Deep Learningã®ã¢ã«ãŽãªãºã ã䜿ã£ãChatGPTã¯ããã®åéã§å€§ããªå¯èœæ§ãç§ããŠããŸãã
ã³ãŒãã«ãã°ãããå ŽåãChatGPTã¯ãããèªèããé©åãªä¿®æ£æ¡ãæ瀺ã§ããŸããããã«ããããããã°ããã»ã¹ãè¿ éåããããä¿¡é Œæ§ã®é«ãã³ãŒããåŸãããããã«ãªããŸãã
ããã«ãChatGPTã¯åŠç¿èœåãæã¡åãããŠãããããæ§ã ãªã³ãŒããã¿ãŒã³ãä¿®æ£ããåŠãã§ãå°æ¥çãªåé¡ãèªåçã«äºæž¬ã察åŠããå¯èœæ§ãç§ããŠããŸãããã®ããã«Deep Learningã䜿ã£ãããã°ã©ã ã®èªåä¿®æ£ã¯ãããã°ã©ãã³ã°ã®æªæ¥ã«ãããŠéèŠãªåœ¹å²ãæ ãããšã§ãããã
4. JUnitãšChatGPTã®çµã¿åããæè¡
ããã°ã©ãã³ã°ã®äžçã«ãããŠãé©æ°çãªããŒã«ã®çµã¿åããã¯äœæ¥ã®è³ªãšå¹çãé£èºçã«åäžãããŸããç¹ã«JUnitãšããJavaã®ããã®ãã¹ããã¬ãŒã ã¯ãŒã¯ãšãChatGPTãšããèªç¶èšèªåŠçãçšããAIæè¡ãçµã¿åãããããšã«ãããéçºéçšã倧ããå€é©ããã€ã€ãããŸãã
ãã®èšäºã§ã¯ãJUnitãšChatGPTãçµã¿åãããããã°ã©ãã³ã°æè¡ã«çŠç¹ãåœãŠããã¹ãã³ãŒãã®èªåçæããŠããããã¹ãã®ã¡ã³ããã³ã¹ãšãªãã¡ã¯ã¿ãªã³ã°ãç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³ïŒCIïŒãžã®å¿çšããããŠããã°ã©ãã³ã°äœæ¥ã®å¹çåã«å¯Ÿããè²¢ç®åºŠã«ã€ããŠè©³ããèŠãŠãããŸãã
åè¿°ã®éããæé©åãããèšäºæ§æãéããŠéèŠãªæ å ±ãæäŸããããšãç®æããŸãããã²ãã®èšäºããJUnitãšChatGPTã®ããã³ã·ã£ã«ãæ倧éã«æŽ»çšããããšããéçºè ã®æ¹ã ã«ãšã£ãŠãå®çšçãªç¥èŠãæäŸããããšãé¡ã£ãŠããŸãã
4.1 ChatGPTã«ãããã¹ãã³ãŒãã®èªåçæ
ChatGPTã掻çšããããšã§ãJUnitã䜿ã£ããã¹ãã³ãŒããè¿ éãã€æ£ç¢ºã«èªåçæããããšãå¯èœã«ãªããŸãããã®æè¡ã¯ãæäœæ¥ã«ãããã¹ãã³ãŒãäœæã®æéãå€§å¹ ã«åæžããã³ãŒãã£ã³ã°ã®ç²ŸåºŠãåäžããããšããã¡ãªããããããŸãã
ãã¹ãé§åéçºïŒTDDïŒã®ãã©ã¯ãã£ã¹ã«ãããŠããChatGPTãæäŸããèªååã¯ç¹ã«äŸ¡å€ãé«ãã§ããä»æ§ã®å ¥åããé©åãªãã¹ãã±ãŒã¹ãå°åºããããã«äŒŽããã¹ãã³ãŒããçŽ æ©ãå±éã§ããŸããããããèªååã¯ãéçºã®åæ段éã§ã®å質ä¿èšŒã«åœ¹ç«ã¡ãŸãã
ChatGPTã¯ããã°ã©ãã«ãšã£ãŠéåžžã«åŒ·åãªã¢ã·ã¹ã¿ã³ãã§ããããã¹ãã·ããªãªã®æŽç·Žããšããžã±ãŒã¹ã®ç¹å®ãªã©ã«ãå©çšããããšãã§ããŸããæ£ç¢ºãªèªåçæãéããŠãåŸæ¥ã¯èŠèœãšããã¡ã ã£ãåé¡ç¹ãæŽãåºããããã«ãªãã®ã§ãã
4.2 ãŠããããã¹ãã®ã¡ã³ããã³ã¹ãšãªãã¡ã¯ã¿ãªã³ã°
ãŠããããã¹ãã¯ãã³ãŒãããŒã¹ãé²åããã«ã€ããŠç¶ç¶çã«ã¡ã³ããã³ã¹ãããªããã°ãªããŸãããChatGPTãå©çšããããšã§ããã®ã¡ã³ããã³ã¹äœæ¥ãç°¡æœåãããªãã¡ã¯ã¿ãªã³ã°ã®ããã»ã¹ãåçåããããšãã§ããŸãã
ãªãã¡ã¯ã¿ãªã³ã°ã«äŒŽããã¹ãã³ãŒãã®æŽæ°ãèªååããããšã«ãããããã°ã©ãã¯æ¬è³ªçãªéçºæŽ»åã«ããå€ãã®æéãè²»ããããšãå¯èœãšãªããŸããChatGPTã¯ãå€æŽãããèŠä»¶ãç解ããä¿®æ£ãå¿ èŠãªãã¹ãã³ãŒããææããã®ã«åœ¹ç«ã¡ãŸãã
ãŸããåé·ãªãã¹ãã®åé€ããåé·æ§ã軜æžããããã®ãã¹ãã³ãŒãã®æé©åãä¿é²ããããšããChatGPTã®åŒ·ã¿ã§ããããã«ãããé«å質ã§ã¡ã³ããã³ã¹ãããããã¹ãã¹ã€ãŒããç¶æããããšãã§ããŸãã
4.3 ç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³(CI)ãšChatGPTã®åœ¹å²
ç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³(CI)ã¯ãçŸä»£ã®ãœãããŠã§ã¢éçºã«ãããŠå¿ é ã®ãã©ã¯ãã£ã¹ãšãªã£ãŠããŸããChatGPTã¯ãCIãã€ãã©ã€ã³å ã§é«åºŠãªèªåãã¹ããšçµåããŠãéçºããã»ã¹ãå¹æçã«æ¯æŽããŸãã
CIç°å¢ã§ã¯ãã³ãŒãã®å€æŽããšã«èªåã§ãã«ããšãã¹ããè¡ããããããããã§ChatGPTã®èªåçæããããã¹ãã³ãŒãã倧ããªå©ç¹ããããããŸããã³ããããããå€æŽãæ¢åã®åäœã«åœ±é¿ãäžããŠããªãããè¿ éã«æ€èšŒã§ããã®ã§ãã
ããã«ãChatGPTã¯CIããŒã«ãšé£æºããŠããã«ãã®å€±æããã¹ãã®äžåæ Œãçºçããéã®ãã©ãã«ã·ã¥ãŒãã£ã³ã°ã«ã圹ç«ã¡ãŸãããã¹ãçµæã®åæããåé¡è§£æ±ºã®ãã³ããæäŸããéçºãµã€ã¯ã«ã®æéãççž®ããããšã«è²¢ç®ããã®ã§ãã
4.4 ããã°ã©ãã³ã°äœæ¥ã®å¹çåãžã®è²¢ç®åºŠ
ã³ãŒããæžãæéã¯ãããã°ã©ãã®è²ŽéãªãªãœãŒã¹ã§ããChatGPTã掻çšããããšã§ãããã°ã©ãã³ã°äœæ¥ã®å¹çãæ Œæ®µã«åäžããŸããç¹ã«ãç ©éãªããã»ã¹ããã€ã©ãŒãã¬ãŒãã³ãŒãã®çæãèªååããããšãã§ããŸãã
ãã¹ãã³ãŒãã ãã§ãªããããã¥ã¡ã³ããŒã·ã§ã³ã®äœæãã³ãŒãã¬ãã¥ãŒäžã®ãã£ãŒãããã¯ã®èªååã«ãChatGPTã¯åŒ·åã§ããéçºè ã¯ããåµé çãªæŽ»åã«éäžããããšãã§ããããã«ãªããå šäœçãªéçºé床ãšå質ãåäžããŸãã
æçµçã«ãChatGPTã®çµã¿åããæè¡ã¯ãããã°ã©ã ãæå³ããéãã«æ©èœããããšãä¿èšŒããã®ã¿ãªãããããã°ã©ãã®çç£æ§ãå€§å¹ ã«é«ããããšã«æåããŠããŸããããã«ãããéçºããŒã ã¯ãªãªãŒã¹ãŸã§ã®æéãççž®ããããŒã±ãããžã®æ©ææå ¥ãç®æãããšãã§ããã®ã§ãã
5. å®è·µçãªãã¹ãæŠç¥
ããã°ã©ãã³ã°ã®äžçã«ãããŠãå ç¢ãªã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããã«ã¯ãå¹æçãªãã¹ãæŠç¥ãæ¬ ãããŸãããJUnitãå©çšããJavaã®ãã¹ãèªååããã»ã¹ã§ã¯ãããããã®ãã¹ãã±ãŒã¹ãã¯ãªãã£ã«ã«ãªã¢ããªã±ãŒã·ã§ã³ã®æ©èœã確èªããæªç¥ã®ãšã©ãŒããã°ãäºãçºèŠããããã®éèŠãªåœ¹å²ãæãããŸããæ¬ç« ã§ã¯ãå®éã®éçºçŸå Žã§åœ¹ç«ã€ãã¹ãæŠç¥ã«ã€ããŠæãäžããŠãããŸãã
é«å質ãªãœãããŠã§ã¢ãä¿èšŒããããã®ãã¹ãã¯ããã åçŽãªæ©èœã®åäœã確èªããã ãã§ã¯ãªãããœãããŠã§ã¢ãäºæããªãå ¥åãç¶æ³äžã§ãæ£ããåäœããããšãä¿èšŒããå¿ èŠããããŸãããã®ãããªç¶²çŸ çãªã¢ãããŒããåãããšã§ãããä¿¡é Œæ§ã®é«ããœãããŠã§ã¢ããªãªãŒã¹ããããšãå¯èœãšãªããŸãã
ãã¹ãæŠç¥ãæ§ç¯ããéã«ã¯ãæ§ã ãªãã¹ãã¬ãã«ãçš®é¡ãããããšãç解ããããããã®ã¬ãã«ã§é©åãªãã¹ãã±ãŒã¹ãèšèšããããšãéèŠã§ããåäœãã¹ããçµ±åãã¹ããã·ã¹ãã ãã¹ããåãå ¥ããã¹ããšãã£ãç°ãªãã¹ããŒãžã§è¡ããã¹ãããããJUnitã䜿çšããããšã§ç¹ã«åäœãã¹ãã®å¹çãå€§å¹ ã«åäžãããããšãã§ããŸãã
5.1 ãšããžã±ãŒã¹ãšã¬ãžãªãšã³ã¹ãã¹ã
ãšããžã±ãŒã¹ã¯ãããã°ã©ã ãæ³å®å€ã®åäœãããå¯èœæ§ã®ãã極éã®ç¶æ³ãæããŸããéåžžã®åäœç¯å²ã®å¢çãç¹ç°ç¹ã«çºçããäºæãã¬äžå ·åãåŒãèµ·ããããšããããŸãããšããžã±ãŒã¹ãç©æ¥µçã«ãã¹ãããããšã§ãã·ã¹ãã ã®å ç¢æ§ãé«ããããšãå¯èœã«ãªããŸãã
ã¬ãžãªãšã³ã¹ãã¹ããšã¯ãäºæããªããšã©ãŒãé害ããã·ã¹ãã ãè¿ éã«å埩ããç¶ç¶ããŠæ©èœããèœåã枬å®ãããã¹ãã§ããäŸãã°ãå€éšãµãŒãã¹ã®ããŠã³ããããã¯ãŒã¯é害æã®ã·ã¹ãã ã®æ¯èããã·ãã¥ã¬ãŒã·ã§ã³ãããã®å¯Ÿå¿çãæ€èšŒããŸãããã®çš®ã®ãã¹ãã¯ãã·ã¹ãã ã®ä¿¡é Œæ§ãå埩åãå·Šå³ããèŠçŽ ãšãªãåŸãŸãã
JUnitãçšããŠãšããžã±ãŒã¹ãã¬ãžãªãšã³ã¹ãã¹ããå®æœããéã¯ãç°åžžå€ãéçå€ãå ¥åãšãããã¹ãã±ãŒã¹ãçšæããäŸå€åŠçãé©åã«æ©èœãããã©ããã確èªããŸãã質ã®é«ããã¹ãã³ãŒãã¯ãããç¹æ®ãªç¶æ³ãèæ ®ã«å ¥ããã¢ããªã±ãŒã·ã§ã³ã®å®å®æ§ãåäžãããŸãã
5.2 Mockãªããžã§ã¯ããšãã¹ãããã«ã®æŽ»çš
ãŠããããã¹ãã§ã¯ããã¹ã察象ã®ã¯ã©ã¹ãã¡ãœããã ããéé¢ããŠãã¹ãããããšãæ±ããããŸãããã®éãå€éšã®äŸåé¢ä¿ãæš¡å£ããããã«Mockãªããžã§ã¯ãããã¹ãããã«ãçšããããŸããããã«ããããã¹ãã®å®è¡é床ãåäžããããšå ±ã«ããã¹ã察象以å€ã®éšåã§èµ·ããäžå ·åã®åœ±é¿ãåããã«æžããšããå©ç¹ããããŸãã
Mockãªããžã§ã¯ãã¯ããã¹ãã®ããã«åçŸãããåœïŒã¢ãã¯ïŒã®ãªããžã§ã¯ãã§ãããäŸåããã¯ã©ã¹ã®å ·äœçãªæ¯ãèããã·ãã¥ã¬ãŒãããŸããäžæ¹ããã¹ãããã«ã¯ãã¹ã¿ããã¹ãã€ããã§ã€ã¯ãªã©ãããåºæ³ãªçšéã«çšããããä»»æã®ãã¹ãå°çšãªããžã§ã¯ããæããŸãããããã®ææ³ãé§äœ¿ããããšã§ãã³ãŒããå€éšã·ã¹ãã ã«äŸåããããšãªããã¹ããè¡ããããã«ãªããŸãã
JUnitã䜿ã£ããã¹ãã³ãŒãã§ã¯ãMockitoãªã©ã®ã¢ãã¯ãã¬ãŒã ã¯ãŒã¯ãçšããŠMockãªããžã§ã¯ããçæãããã¹ã察象ã®ã¡ãœãããæåŸ éãã®åäœãè¡ãããæ€èšŒããŸããããããææ³ã¯ãç¹ã«å€§èŠæš¡ãªã¢ããªã±ãŒã·ã§ã³ã®ãã¹ãã«ãããŠãã³ãŒãã®å¯èªæ§ãšä¿å®æ§ãåäžãããéèŠãªæ段ãšãªããŸãã
5.3 æ§èœãã¹ããšè² è·è©Šéš
æ§èœãã¹ãã¯ãœãããŠã§ã¢ã®ã¹ããŒããå¿çæ§ãå®å®æ§ãªã©ãç¹å®ã®æ¡ä»¶äžã§ã®ã·ã¹ãã ã®æ¯ãèãã枬å®ããŸããè² è·è©Šéšã¯äžçš®ã®æ§èœãã¹ãã§ãããã·ã¹ãã ã倧éã®ããŒã¿ããŠãŒã¶ãŒããã®åæã¢ã¯ã»ã¹ãåŠçããèœåããã¹ãããŸãããããã¯ã·ã¹ãã ã®ãã£ãã·ãã£ãšã¹ã±ãŒã©ããªãã£ãè©äŸ¡ããããã«ãéåžžã«éèŠãªããã»ã¹ã§ãã
JUnitã掻çšããæ§èœãã¹ãã§ã¯ãã³ãŒãã®å®è¡æéãèšæž¬ããããšã§ãç¹å®ã®ã¡ãœãããåŠçãäºæããæéå ã§å®äºãããã確èªããããšãã§ããŸããäžæ¹ãè² è·è©Šéšã§ã¯ãå€æ°ã®ä»®æ³ãŠãŒã¶ãŒãçæããŠã·ã¹ãã ã«ã¢ã¯ã»ã¹ããããªã¢ã«ã¿ã€ã ã§ã®ã·ã¹ãã ã®æåã芳å¯ããããšãå¯èœã§ãã
ãããã®ãã¹ããé©åã«è¡ãããšã«ãããããŒã¯æã®ãã©ãã£ãã¯ã«å¯ŸãããµãŒãã¹ã®èä¹ æ§ãè©Šããããã«ããã¯ãããã©ãŒãã³ã¹ã®åé¡ãäºåã«ç¹å®ãæ¹åããããšãã§ããŸããæ§èœã®åé¡ã¯ãã°ãã°ãŠãŒã¶ãŒäœéšãæãªãèŠå ãšãªãããããããé²ãããã«JUnitãå«ãåçš®ãã¹ãããŒã«ã掻çšããããšãæšå¥šãããŸãã
5.4 ã»ãã¥ãªãã£ãã¹ãã®å®è£ ãšãã®éèŠæ§
ã»ãã¥ãªãã£ãã¹ãã¯ãã¢ããªã±ãŒã·ã§ã³ãå€éšããã®è åšã«å¯ŸããŠã©ã®çšåºŠå®å šãªã®ãã調ã¹ãããã®ãã¹ãã§ããæ»æè ã«ãã䟵害ãé²ããã·ã¹ãã ã®ä¿è·æ©èœãé©åã«åäœãããã©ãããæ€èšŒããŸãããã®ãã¹ãã¯ããŠãŒã¶ãŒã®ããŒã¿ä¿è·ãäŒæ¥ã®ä¿¡é Œæ§ã確ä¿ããäžã§éåžžã«éèŠã§ãã
JUnitã䜿ã£ãã»ãã¥ãªãã£ãã¹ãã§ã¯ãã¯ãã¹ãµã€ãã¹ã¯ãªããã£ã³ã°ãSQLã€ã³ãžã§ã¯ã·ã§ã³ãªã©ãæ§ã ãªã»ãã¥ãªãã£è匱æ§ã«å¯Ÿããè åšãæš¡å£ãããã¹ãã±ãŒã¹ãäœæããã¢ããªã±ãŒã·ã§ã³ããããã®æ»æã«å¯ŸããŠååã«èæ§ãæã£ãŠãããã確èªããŸããéçºã®æ©æ段éã§ã»ãã¥ãªãã£ãã¹ããå®æœããããšã§ããªã¹ã¯ãæå°éã«æããããšãå¯èœã§ãã
çŸä»£ã®éçºç°å¢ã§ã¯ãç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³ïŒCIïŒãç¶ç¶çããªããªãŒïŒCDïŒãšãã£ãææ³ãæ®åããŠããããšãããèªååãããã»ãã¥ãªãã£ãã¹ããçã éèŠèŠãããŠããŸããèªååããŒã«ãšé£æºãJUnitã䜿çšããããšã§ãã»ãã¥ãªãã£ãã¹ããå¹ççã«ç¹°ãè¿ãå®è¡ããéçºããã»ã¹å šäœã®ã»ãã¥ãªãã£ã匷åããããšãã§ããŸãã
6. ChatGPTãšJUnitã®ãã¹ããã©ã¯ãã£ã¹
6.1 å質ä¿èšŒã®ããã®ãã¹ãèšç»ç«æ¡
ãããžã§ã¯ãã®æåã¯ãã°ãã°å質ä¿èšŒã®ã¬ãã«ã«çŽçµããŸãããã®ãããå¹ççãªãã¹ãèšç»ãç«æ¡ããããšãæ¬ ãããŸããããã¹ãèšç»ãç«æ¡ããã«ã¯ãèŠä»¶ãæ£ç¢ºã«ç解ãããããæ€èšŒãããã¹ãã±ãŒã¹ãç¶²çŸ çã«çšæããããšãéèŠã§ããJUnitã䜿çšããäžã§ã®èšç»ã«ã¯ãã©ã®ãã¹ãããŠãããã¬ãã«ã§è¡ãããã¹ãããã©ã®éšåãçµ±åãã¹ãã«å§ããããã¹ãããæ éã«æ±ºå®ããããšãå«ãŸããŸãã
察象ãšãªãã³ãŒãã®æ©èœã«å¿ããŠç°ãªããã¹ãã¬ãã«ãèšå®ããããã«åºã¥ããŠåªå é äœã決ããããšãããã¹ãããã»ã¹ãæŽçããç¡é§ãåæžããäžã§ã®éµãšãªããŸããChatGPTããã®ä»ã®AIããŒã«ã掻çšãããã¹ãã±ãŒã¹ã®çæãèŠä»¶ã®æ žå¿ãã€ããããšã§ãããå¹æçãªãã¹ãèšç»ãçå®ããããšãã§ããŸãã
ãŸããç¶ç¶çãªãã¹ãèšç»ã®èŠçŽããšã¢ããããŒãã¯ããœãããŠã§ã¢éçºã®ã©ã€ããµã€ã¯ã«ã«ãããŠå€åããèŠä»¶ãæ°ããæ©èœã«å¯Ÿå¿ããããã«å¿ é ã§ãããã¹ãèšç»ã®èŠçŽãã«ã¯ãå®è¡ããããã¹ãã®çµæãšãã£ãŒãããã¯ãåæããŠãå°æ¥ã®ãã¹ããµã€ã¯ã«ã§ã®æ¹åã«ã€ãªããããšãå«ãŸããŸãã
6.2 ã³ãŒãã¬ãã¥ãŒãšãã¢ããã°ã©ãã³ã°ã®çµ±å
ã³ãŒãã®å質åäžã®ããã«ã¯ãã³ãŒãã¬ãã¥ãŒãšãã¢ããã°ã©ãã³ã°ã®å®è·µã¯äžå¯æ¬ ã§ãããããã®ãã©ã¯ãã£ã¹ã¯ãã³ãŒãã£ã³ã°ãšã©ãŒããã°ãæ©æã«çºèŠããã®ã«åœ¹ç«ã¡ãŸããJUnitã䜿çšããŠããå Žåãæ©ã段éã§ãã¹ãã«é¢ãããã£ãŒãããã¯ãåŸãããšãã§ãããã®çµæãããå ç¢ã§ä¿¡é Œæ§ã®é«ãã³ãŒãã®éçºã«ç¹ãããŸãã
ãã¢ããã°ã©ãã³ã°ã§ã¯ãäºäººã®éçºè ãååããŠäžã€ã®ã¿ã¹ã¯ãè¡ãããªã¢ã«ã¿ã€ã ã§ã³ãŒãã®ã¬ãã¥ãŒãè¡ãããŸããããã¯ããããã°ã®æéãççž®ããã¯ãªãšã€ãã£ããªè§£æ±ºçãçã¿åºãå¯èœæ§ãé«ããŸããããã«ãããŒã ã¡ã³ããŒéã®ã¹ãã«å ±æãšããä»å 䟡å€ãããããããŸãã
ã³ãŒãã¬ãã¥ãŒã¯ãç¹ã«åæ£ããŒã ããã¬ãã·ãã«ãªå€åäœç³»ãæ®åããäžãéåæã§è¡ãªãããããšãå€ããªããŸãããæ確ãªåºæºãšãã§ãã¯ãªã¹ããçšããã°ãã¬ãã¥ã¢ãŒã¯ã³ãŒãã®å šé¢çãªå質ããã§ãã¯ããææäºé ãå¹æçã«éçºè ã«éå ããããšãã§ããŸãã
6.3 ãªãã¡ã¯ã¿ãªã³ã°ãšãã¯ãã«ã«ãããã®ç®¡ç
ãªãã¡ã¯ã¿ãªã³ã°ã¯ãã³ãŒãã®å¯èªæ§ãšä¿å®æ§ãé«ããããã«äžå¯æ¬ ãªããã»ã¹ã§ãããã¯ãã«ã«ãããã®èç©ã¯é·æã«ããããããžã§ã¯ãã®å¹çãšå¯æž¬æ§ãäœäžãããŸãããªãã¡ã¯ã¿ãªã³ã°ãè¡ãéã«ã¯ãæ¢åã®ãã¹ãã³ãŒããååã«å©çšããæ¹åãè¡ã£ãåŸãæ©èœãæ£åžžã«åäœããããšãä¿èšŒããå¿ èŠããããŸãã
JUnitãçšãããŠããããã¹ãã¯ãªãã¡ã¯ã¿ãªã³ã°æã®åŒ·åãªå³æ¹ãšãªããŸããæ¢åã®ãã¹ããé©åã§ããã°ããªãã¡ã¯ã¿ãªã³ã°ã®çµæãæå³ããªãæ©èœå€æŽãäžå ·åãã³ãŒãã«å ãã£ãéã«éããã«æ€ç¥ããããšãå¯èœã§ãããã¹ããåå ã®ç¹å®ã«åœ¹ç«ã€ããšã§ããªãã¡ã¯ã¿ãªã³ã°ãããã¹ã ãŒãºã«ããããŠç¢ºå®ã«è¡ãããŸãã
ãã¯ãã«ã«ãããã®ç®¡çã«ã¯ç©æ¥µçãªã¢ãããŒããæ±ããããŸããå®æçãªã¬ãã¥ãŒãéããŠãè² åµã®çºçæºãç¹å®ããåªå 床ã«åºã¥ããŠè² åµã®è§£æ¶èšç»ãçå®ããããšãéèŠã§ãããŸããæ°ããªãã¯ãã«ã«ããããçºçããªãããã«æ³šææ·±ãéçºãé²ããã¹ãã§ãã
6.4 ãã¹ãèªååæŠç¥ã®çå®ãšå®è¡
å¹ççãªãœãããŠã§ã¢éçºã®ããã«ã¯ããã¹ãã®èªååãéèŠãªèŠçŽ ãšãªããŸãããã¹ãèªååæŠç¥ãçå®ããã«ã¯ãã©ã®ãã¹ããèªååãããã¹ããã決ããããšãåºçºç¹ãšãªããŸããéèŠãªããžãã¹ããžãã¯ãæã€éšåãé »ç¹ã«å€æŽãããæ©èœã¯ãèªååã®æåªå äºé ã§ãã
èªååãã¹ãã¯ãæé æžã«åŸã£ãŠäžé£ã®ãã¹ãã±ãŒã¹ãå®è¡ããããšã§ã人æãä»ããã«å®æçã«åçŸå¯èœãªãã¹ããæäŸããŸããJUnitãã¬ãŒã ã¯ãŒã¯ãšCI/CDãã€ãã©ã€ã³ãçµã¿åãããããšã«ããããœãŒã¹ã³ãŒãã®æŽæ°ãããªã¬ãŒãšãªã£ãŠãã¹ããèªåçã«å®è¡ãããããããããŒã®æéãå€§å¹ ã«åæžããŸãã
äžæ¹ã§ãå šãŠãèªååããããšãç®çã§ã¯ãããŸãããã³ã¹ããšå©çã倩秀ã«ãããæã䟡å€ãæäŸããèªååã®ç¯å²ãå®ããããšãéèŠã§ãããŸããå®æçãªèªååãã¹ãã®ã¡ã³ããã³ã¹ãå¿ããã«è¡ãå¿ èŠããããŸããããã«ããããã¹ãã¹ã€ãŒããåžžã«ææ°ã®ç¶æ ã«ä¿ã¡ããã®ä¿¡é Œæ§ã確ä¿ããããšãã§ããŸãã