2. æ¬ã¹ã©ã¤ãã®å¯¾è±¡ æ®æ®µ Eclipse ã使ã£ã¦ãã Java ãããããã¼å ¨è¬ JUnit ã使ã£ã¦ããããããã¡ãã£ã¨ã¹ãã¼ãã« ãã¹ããæ¸ãããã¨æã£ã¦ãã人 ãã¹ãã®ãªãããã¸ã§ã¯ãã§å°ã£ã¦ãã ããã¼ã¸ã£ã¼ã»ãªã¼ãã¼
ä»æ¥ï¼2015-04-25ï¼ã¯ç¦ç¥å±±ç·ã®è±ç·äºæ ãã 10 å¹´ç®ã® 4 æ 25 æ¥ãã¤ã¾ããã¾ãã¼ããããã¨ç³äºåããã亡ããªããã¦ããã 10 å¹´ã«ãªãã ã¾ãã¼ãããã¯ãä¸è¨ã§ããã° 1990 年代å¾åãã 2000 年代ååã®æ¥æ¬ã«ããããªãã¸ã§ã¯ãæåããã°ã©ãã³ã°ãèªåãã¹ãã¨ãã¹ãé§åéçºãããã¦ã¢ã¸ã£ã¤ã«ã½ããã¦ã§ã¢éçºã®åèã«ããã¦å¤§ããªå½¹å²ãæããããæ¹ã ãããã 10 å¹´åã®ç¦ç¥å±±ç·ã«ä¹ã£ã¦ããªããã°ããã¾ã§ãæ¥æ¬ã代表ããããã°ã©ãã®ä¸äººã ã£ãã®ã§ã¯ãªããã¨æãã ã¾ãã¼ãããã®æ®ãã足跡ã¯ãæ§ã ãªã¨ããã«è¦ãã ããã¨ãã§ããã Java ããã°ã©ãã§ããã°ã Quick JUnit ã¨ãã Eclipse ãã©ã°ã¤ã³ã使ã£ããã¨ãããæ¹ãå¤ãã®ã§ã¯ãªããã¨æãã Quick JUnit ã¯ãã¹ãã³ã¼ãã¨ãã¹ã対象ã³ã¼ãã®éãã·ã§ã¼ãã«ããã§è¡ãæ¥ã§ãã便å©ãªãã©ã°
AWSãã¼ã ã«åç»ãã¦2ã¶æã»ã©çµã¡ã¾ãããã¨ããããAWSã®æ§ç¯ãªã©ã«ã¯ãã¾ãé¢ããããã²ãããAWSã«é¢é£ãããããã¯ãã®éçºãè¡ãæ¯æ¥ã§ãããããªæããã¹ãã次ã®ãããªãªã¯ã¨ã¹ããããã ãã¾ããã ã¦ã¼ã¶ãåç §ã§ããªãæ å ±ã«ã¤ãã¦ãåç §ã§ããªããã¨ãæ¤è¨¼ãã¦æ¬²ãã ã»ã»ã»ãåºæ¥ãªããã¨ã®æ¤è¨¼ãã§ãã ãåºæ¥ããã¨ã®æ¤è¨¼ãã§ããã°ããã®ä¾ããã¹ãã±ã¼ã¹ã¨ãã¦è¨è¿°ãã¦ãã¹ããå®è¡ããã°æ¤è¨¼åºæ¥ã¾ããããããåºæ¥ãªããã¨ã証æãããã¨ã¯é常ã«å°é£ã§ãããã ãæ å ±ã¯æéãªãã§ãç·å½ããã«ã§ãããã°ã§ããããããã¾ããã ï¼ï¼ ã·ã¹ãã ã®ã¤ã³ãã©ã¯å½ç¶ã®ããã«AWSã§ãããã¹ãã®ããã®ãªã½ã¼ã¹ã足ããªããã°å¢ããã°ãããããªãã§ãããæéãããããªãã°ä¸¦ååããã°ãããããªãã§ããããã¹ãã®æã ãå¢ããã°ãããã§ãã ãªãã°ãç·å½ããã§ãã¹ãããã ã¨ããæ¹éã«ãªãã¾ãããããã¦ãããã°ã®ãã¿
ããã¾ã§ä¸»ã«éèæ¥ã®ã客æ§ã«å¯¾ããWebã»ã¢ãã¤ã«ã¢ããªéçºã«ããã å質ä¿è¨¼ãã»ãã¥ãªãã£ã®åéã§æ§ã ãªããã¸ã§ã¯ããæ¯æ´ãã¦ãã¾ããã ããã¾ã§å¹ã£ããã¦ãã¦ãåºã«ãã客æ§ã®ãã¼ãºã«å¯ãæ·»ã£ãæé©ãª ã½ããã¦ã§ã¢ãã¹ãã½ãªã¥ã¼ã·ã§ã³ã§è²´ç¤¾ã®æ±ãããå質課é¡ãã解決ãã¾ãã ããã¾ã§ä¸»ã«éèæ¥ã®ã客æ§ã«å¯¾ãã Webã»ã¢ãã¤ã«ã¢ããªéçºã«ããã å質ä¿è¨¼ãã»ãã¥ãªãã£ã®åé㧠æ§ã ãªããã¸ã§ã¯ããæ¯æ´ãã¦ãã¾ããã ããã¾ã§å¹ã£ããã¦ãã¦ãåºã«ã ã客æ§ã®ãã¼ãºã«å¯ãæ·»ã£ãæé©ãª ã½ããã¦ã§ã¢ãã¹ãã½ãªã¥ã¼ã·ã§ã³ã§ 貴社ã®æ±ãããå質課é¡ãã解決ãã¾ãã ããã¾ã§ä¸»ã«éèæ¥ã®ã客æ§ã« 対ããWebã»ã¢ãã¤ã«ã¢ããªéçºã« ãããå質ä¿è¨¼ãã»ãã¥ãªãã£ã® åéã§æ§ã ãªããã¸ã§ã¯ãã æ¯æ´ãã¦ãã¾ããã ããã¾ã§å¹ã£ããã¦ãã¦ãåºã«ã ã客æ§ã®ãã¼ãºã«å¯ãæ·»ã£ã æé©ãªã½ããã¦ã§ã¢ãã¹ã ã½ãª
åä½ãã¹ããâç¥éâåããQuick JUnitã¨Mockitoï¼ã¦ã«ã¤ããã¼ã«ã¤ãã«ã¤ããç°å¢ï¼ï¼16ï¼ Quick JUnitãã©ã°ã¤ã³ã®3ã¤ã®å¤§ããªç¹å¾´ è¿å¹´ãJUnitã¨Hudsonãå©ç¨ããç¶ç¶çã¤ã³ãã°ã¬ã¼ã·ã§ã³ï¼CIï¼ã«ãããã¹ãã®èªååãããã¹ãé§åéçºï¼TDDï¼ã®æ®åãªã©ã«ãããã¦ããããã¹ãï¼åä½ãã¹ãï¼ã®ãã¹ãã³ã¼ãã®ä½æãéè¦è¦ããã¦ãã¾ãã ä»åç´¹ä»ãããQuick JUnitããã©ã°ã¤ã³ã¯ãJUnitã«ãããã¹ãã³ã¼ãã®ä½æã¨å®è£ ãæ¯æ´ããEclipseãã©ã°ã¤ã³ã§ããQuick JUnitãã©ã°ã¤ã³ã¯ç³äºåããã«ããéçºããã¦ãã¾ããããç³äºãããä¸æ ®ã®äºæ ã«ããæ»å»å¾ãQuick JUnitãã©ã°ã¤ã³ããã¸ã§ã¯ãã«ããéçºãç¶ç¶ããã¦ãã¾ããåªãããªã¼ãã³ã½ã¼ã¹ããã¸ã§ã¯ãã®æ¨¡ç¯ã®ãããªããã¸ã§ã¯ãã§ãã è¨æ£ã®ãç¥ãã æ 人ã®ãååã«ã¤ãã¦ééãããããä¿®
JUnitã¨Eclipseã使ã£ã¦å¦ã¶ãâãã¹ãâã®å¸¸èï¼Webã¢ããªã®å¸¸èãJSPã¨Strutsã§èº«ã«ã¤ããï¼10ï¼ï¼1/4 ãã¼ã¸ï¼ æ¬é£è¼ã¯ãJSPï¼ãµã¼ãã¬ããï¼Strutsã®Webã¢ããªã±ã¼ã·ã§ã³éçºãéãã¦ãJavaè¨èªä»¥å¤ï¼PHPãASP.NETãRuby on Railsãªã©ï¼ã®éçºã«ãéç¨ããWebã¢ããªã±ã¼ã·ã§ã³å ¨è¬ã®åºãç¥èã»å¸¸èã身ã«ä»ããããã®é£è¼ã§ã ãã¾ããèããªããâãã¹ãâã®èãæ¹ããã¤ã³ã ä»åã¯ãããã¹ãã®å¸¸èãã¨é¡ããWebã¢ããªã®ãã¹ãæ¹æ³ã説æããããã§ãå®éã«JUnitã使ç¨ãã¦Webã¢ããªã®ãã¹ããè¡ã£ã¦ã¿ã¾ãããã ããããããã¹ãã¨ã¯ä½ã®ããã«è¡ãã®ã§ããããï¼ ãã ä½ã¨ãªããã¹ãé ç®ãä½æãã¦å®æ½ããã®ã§ã¯ãä½æããWebã¢ããªã®å質ãä½ãã£ãããéçºã³ã¹ããé«ããªã£ããã¨å¾ã ãå¾æãããã¨ã«ãªãã¾ããã¾ãããã¹ãããªãè¡ãã®ãããä½ã
ãéæ»è§£èª¬! JUnit 4.4 - æ°ã¢ãµã¼ã·ã§ã³ã¡ã½ãããassertThatãã®ç¨éã¨ã¯ãã§è§¦ããã¨ãããJUnit 4.4ã§ã¯æ°ããã¢ãµã¼ã·ã§ã³ã¡ã½ããã¨ãã¦assertThatãå°å ¥ãããããã ããåããæ°ãã«å°å ¥ãããAssumeã¯ã©ã¹ãä½µç¨ããã¨å¦çã®ãåææ¡ä»¶ãã表ç¾ãããã¨ãã§ãããã¾ãåæ§ã®å¦çã®æ¡å¼µçãªä½¿ãæ¹ã«ãªãããJUnit 4.4ã§ã¯ãTheoryãã¨ããæ¦å¿µãå°å ¥ããã¦ããç¹ãèå³æ·±ããæ¬ç¨¿ã§ã¯ããã®2ã¤ã®æ©è½ã«ã¤ãã¦ç´¹ä»ãããã Assume.assumeThatã§å®è¡ç°å¢ã®ãåææ¡ä»¶ããè¡¨ç¾ ãã¹ãã³ã¼ããä½æãã¦ã¦ããããã¹ããã¯ãªã¢ããã®ã«ãããããããã¢ããªã±ã¼ã·ã§ã³ãä»ã®ç°å¢ã«ç§»ããé端ã«åé¡ãç¾ããã¨ããã®ã¯å®ã«ãããã話ã ãããã¯ã¦ããããã¹ãã³ã¼ããä½æããããããããæé»ã®åæã¨ãã¦ä»®å®ãã¦ãããã®ããèªåã®éçºç°å¢ã¨ã»ãã®ç°å¢ã¨ã§é£ãéã£
18æ¥(ç±³å½æé)ãJUnitã®ææ°çã¨ãªãJUnit 4.4ãå ¬éããããJUnitã¯Javaã§éçºãããã¦ããããã¹ããã¬ã¼ã ã¯ã¼ã¯ãCommon Public License Version 1.0ã®ãã¨ã«å ¬éããã¦ãããã¹ããã¬ã¼ã ã¯ã¼ã¯ã§ãã¦ããããã¹ãç¨ã®ãã¬ã¼ã ã¯ã¼ã¯ã¨ãã¦ã¯äºå®ä¸ã®æ¨æºãå¾çºã®ã¦ããããã¹ããã¬ã¼ã ã¯ã¼ã¯ã«æ¯ã¹ã¦æ±ããé£ããã¨æ¹å¤ããããã¨ããããã4ç³»ããã¯ã¢ããã¼ã·ã§ã³ãå°å ¥ãããªã©ãã¦ã·ã³ãã«åãé²ãããã¦ããã4.4ã§ã¯ããã¤ãæ°æ©è½ãå°å ¥ããã¦ããã®ã§ããã§ç´¹ä»ãããã æ°ããã¢ãµã¼ã·ã§ã³ã¡ã½ããã®å°å ¥: assertThat JUnitã§ã¯ãã¹ããè¨è¿°ããæ¹æ³ã¨ãã¦ã¢ãµã¼ã·ã§ã³ã¡ã½ãããæä¾ãã¦ãããAssert.assertArrayEquals(...)ãªã©ãããã«ããããã®ã§ãã»ãã«ãassertEqualsãassertFalseãass
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}