èªååã®åºæ¬çãªæ§æèŠçŽ -ãã¹ã
ãããã»ãžã§ã³ãœã³
ç§ã¯Webã€ã³ã¿ãŒãã§ãŒã¹ããã¹ããã倧䜿ã§ã¯ãããŸãããããã®ãšãã»ã€ã¯ãã®åéã§ãã§ã«çµéšãç©ãã§ãã仲éã«ãšã£ãŠãã圹ç«ã€å¯èœæ§ãé«ãã§ãã
ãŸããåå¿è ã«ãšã£ãŠã䟿å©ã§ãã æçµè£œåã§ã»ã¬ã³ãšã®ããåããã©ã®ããã«ç·šæãããŠãããã確èªã§ãããœãŒã¹ã³ãŒããæäŸããŸãã
éçºçµéšãã»ãšãã©ãªãç¶æ ããããã¹ããå®è¡ããããã®ãã©ãããã©ãŒã ãäœæããæ¹æ³ãããã³ãã©ãããã©ãŒã èªäœã«ã€ããŠèª¬æããŸãã ç§ã¯èªåã®è£œåãéåžžã«å¹æçã§ãããšããã£ãã®ã§ãå€ãã®äººã«ãšã£ãŠæçšã§ãããæ€èšã®äœå°ããããšèããŠããŸãã
ã³ã³ã»ããã®
ãã¹ãããã»ã¹ã¯æ å ±ã·ã¹ãã ã«äŸåããŸãã
ç§ã®æŠå¿µãèŠããŠããããã«ãããããã©ã®ã·ã¹ãã ã«çŠç¹ãåœãŠãŠããããç解ããå¿ èŠããããŸãããããã¯éåžžãååž°ãã¹ããè¡ãéã«ããŒãšããŠèšå®ãããç¹å®ã®ç·åœ¢ããžãã¹ããã»ã¹ãããã·ã¹ãã ã§ãã
ãããã£ãŠãsrmã®ãããªã·ã¹ãã ã äž»èŠãªããžãã¹ãšã³ãã£ãã£ã¯ãã³ããŒè£œåã§ãã ååž°ãã¹ããå®æœããéã®éèŠãªèæ ®äºé ã¯ãããžãã¹ããã»ã¹ã®æŽåæ§ã§ãã
ããžãã¹ããã»ã¹ã¯ãã·ã¹ãã ãžã®ãµãã©ã€ã€ã®ç»é²ããå§ãŸããåæ¥ããããŒã¶ã«ã®äœæã«é²ã¿ãŸã-ãµãã©ã€ã€ãžã®ããããŒã¶ã«ã®æ€èšã«é¢ãã決å®ãè¿ããããŸã§ãããŸããŸãªã¿ã€ãã®å éšãŠãŒã¶ãŒïŒããã³åãŠãŒã¶ãŒã«åºæã®ã€ã³ã¿ãŒãã§ã€ã¹ããããŸãïŒã«ãã£ãŠå®è¡ãããã¬ãã¥ãŒæ®µéã«é²ã¿ãŸãã
ç§ãã¡ã¯å€ãã®ç°ãªãã€ã³ã¿ãŒãã§ãŒã¹ãééããã»ãšãã©ã®å Žåç°ãªãã€ã³ã¿ãŒãã§ãŒã¹ã§åäœããããšãããããŸããã å®éããããçŽæ¥èŠãã°ãããã¯ãŸãã§ãããªããŒããèŠãŠãããããªãã®ã§ãã ããã¯ãéå§ãšçµäºã®ããããã»ã¹ã§ããã絶察ã«ç·åœ¢ã§ããåå²ã¯ãããŸããããã¹ããèšè¿°ãããšãã«ãæåŸ ãããçµæãåžžã«ããããŸãã ã€ãŸã ãã§ã«ãã®å³ãèŠãŠããã¹ããå€æ çã«ããããšã¯æåããªããšçµè«ä»ããããšãã§ããŸãã ãããèæ ®ããŠããã¹ããå®è¡ããããã®ãã©ãããã©ãŒã ãäœæãããšãã«ããã¹ããèšè¿°ããé床ãèšå®ããéèŠãªèŠçŽ ã決ããŸããã
ç§ãèªåã®ããã«èšå®ããæŠå¿µïŒ
- èªåãã¹ãã¯ã§ããã ãæ©ãäœæããå¿ èŠããããŸãã å®æ§çã«ãããéæããå Žåãä¿¡é Œæ§ã䜿ãããããªã©ãä»ã®åŽé¢ã¯èªåã§ãã£ãŠããã¯ãã§ãã
- ãã¹ãã¯å®£èšçã«å®£èšããã³ãŒããšã¯å¥ã«å®è¡ããå¿ èŠããããŸãã ç§ã¯å¥ã®ãªãã·ã§ã³ããèŠãŸããã§ããã ããã«ãããæžã蟌ã¿é床ãåäžããŸãã æ¢è£œã®ã€ã³ã¿ãŒããªã¿ãŒãããã°ãç§ãã¡ã®ãã©ãããã©ãŒã ã§ãåŸããè¿œå ããå¿ èŠã¯ãããŸãããããäžåºŠã³ãŒãã«ã¢ã¯ã»ã¹ããå¿ èŠã¯ãããŸãããäžè¬çã«ãIDEã䜿çšããŠå®æãããã©ãããã©ãŒã ãå¿ããããšãã§ããŸãã ãã®ããããã¹ãã®ä¿å®ãç°¡åã«ãªããŸãã ãã®åœ¢åŒã§ã¯ãæžãããšãåŠã³ããããªããŸãããªããªãã éçºã¹ãã«ã¯å¿ èŠãããŸããããããŒã¯ã¢ããèšèªã®ç解ã®ã¿ãå¿ èŠã§ãã ãã®åœ¢åŒã§ã¯ãããã»ã¹ã®ãã¹ãŠã®åå è ãç解ã§ããŸãã
æåã«æåŠããããšã«ããããšïŒ
- ã·ã¹ãã ããã¹ããã¬ãŒã ã¯ãŒã¯ã§ã©ããããªãã§ãã ããã ãã¹ããã¬ãŒã ã¯ãŒã¯ãªãã§ããã»ã¹ã®å®è¡ãéå§ã§ããŸãã ãããªãã¯èªè»¢è»ãçºæãããïŒã-å€ãã®äººãèšãã§ãããã éããšæãã äžè¬çã«äœ¿çšããããã¹ããã¬ãŒã ã¯ãŒã¯ã¯ãäž»ã«å éšããã³ãŒãããã¹ãããããã«äœæããããã®ã§ãå€éšããã·ã¹ãã ã®å€éšéšåããã¹ãããŸãã ããŒããã€ã¯ãæã£ãŠãããããªãã®ã§ããªãããŒãã®å±±ãäžãå¿ èŠããããŸãïŒå€±ç€Œã§ãããæèã®æµããåæ ãããŠããŸãïŒã äžè¬ã«ããã©ãã¯ãžã£ãã¯ãš...ã§ãã¬ãŒã ã¯ãŒã¯ãèªåã§èšè¿°ããŸãïŒããšãã°ãJUnit 5ã¯ãã§ã«ãã®ãããªã¿ã¹ã¯ã«ã¯ããã«é©åããŠããããšã¯æ¿ç¥ããŠããŸããïŒã
- ã»ã¬ã³ã®ã©ãããŒã®äœ¿çšãæåŠã å®éãããŒã©ã€ãã©ãªèªäœã¯å°ããã§ãã ãã®æ©èœã®5ïŒ ã䜿çšããå¿ èŠãããããšãç解ããã«ã¯ãå®å šã«ã·ã£ãã«ã§åŠçããã®ã«æ°æéããããŸãã ããå°ãªãã³ãŒããæžãããã€ã¬ã«æ £ããæ¹æ³ãæ¢ããŠã©ãã«ã§ãã çŸä»£ã®äžçã§ã¯ããã®æ¬²æ±ã¯ãã°ãã°äžæ¡çã«ã€ãªãããã»ãšãã©åžžã«æè»æ§ãæãªããŸãïŒã€ãŸããã¢ãŒããã¯ãã£ãã¬ãŒã ã¯ãŒã¯ã®ã±ãŒã¹ã§ã¯ãªãããã³ãŒããå°ãªããããã¢ãããŒãã§ãïŒã
- çµæã®çŸãããã¬ãŒã³ããŒã·ã§ã³ã¯å¿ èŠãããŸããã ãã®ã¢ã€ãã ãå°å ¥ããã®ã¯ã ç§ã¯ãã€ãŠããã«çŽé¢ããŠããŸããã èªåãã¹ããå®äºãããã2ã€ã®ããšãç¥ãå¿ èŠããããŸãïŒå šäœçãªçµæïŒæ£/è² ïŒãããã³ãšã©ãŒããã£ããã©ãã-æ£ç¢ºã«ã ããããããŸã çµ±èšãä¿æããå¿ èŠããããŸãã çµæã®ç¹ã§ä»ã®ãã¹ãŠã¯çµ¶å¯Ÿã«äžå¯æ¬ ã§ã¯ãããŸããã çŸãããã¶ã€ã³ãéèŠãªãã©ã¹ãšèããããåæ段éã§ãã®çŸãããã¶ã€ã³ã«æéãè²»ããããšã¯äœåãªã·ã§ãŒã§ãã
ããã€ãã®è©³çŽ°ãå®å šã«æ確ã«ããããã«ãäŒç€Ÿã®éçºã¬ãã«ãšããŒã«ã®äœææ¡ä»¶ã«ã€ããŠããå°ãã話ããŸãã
ããã€ãã®æ©å¯äºé ã®ãããç§ã¯å€åå ã®äŒç€Ÿãé瀺ããŸããã
åœç€Ÿã§ã¯ãéçºãé·å¹Žã«ããã£ãŠãã§ã«ååšããŠããããããã¹ãŠã®ããã»ã¹ãé·ãé確ç«ãããŠããŸãã ãããããããã¯çŸåšã®åŸåãããã¯ããã«é ããŠããŸãã
ITã®ãã¹ãŠã®ä»£è¡šè ã¯ãã³ãŒãããã¹ãã§ã«ããŒããå°æ¥ã®æ©èœã®èŠä»¶ã調æŽããéã«èªåãã¹ãçšã®ã¹ã¯ãªãããäœæããå¿ èŠãããããšãæè»ãªãã¯ãããžãŒãæéãšãªãœãŒã¹ãå€§å¹ ã«ç¯çŽããããšããããŠåã«åœã奪ãåçŽåããCIãå¿ èŠã§ããããšãç解ããŠããŸãã ãããããããŸã§ã®ãšãããããã¯ãã¹ãŠãã£ãããšç§ãã¡ã«å±ããŠããŸã...
ãœãããŠã§ã¢å質管çãµãŒãã¹ãåæ§ã§ãããäžãããã®ããã»ã¹ãèŠããšããã¹ãŠã®ãã¹ããæåã§å®è¡ãããŸãããããéçºããã»ã¹å šäœã®ãããã«ããã¯ãã§ãã
çµç«èª¬æ
ãã©ãããã©ãŒã ã¯ãJDK 12ã䜿çšããŠJavaã§èšè¿°ãããŠããŸã
äž»èŠã€ã³ãã©ããŒã«-Selenium Web DriverãOJDBC
ã¢ããªã±ãŒã·ã§ã³ãæ©èœãããã«ã¯ãFireFoxãã©ãŠã¶ãŒããŒãžã§ã³52ãPCã«ã€ã³ã¹ããŒã«ããå¿ èŠããããŸã
ã¢ããªã±ãŒã·ã§ã³ãã«ãæ§æ
ã¢ããªã±ãŒã·ã§ã³ã§ã¯ã3ã€ã®ãã©ã«ããŒãš2ã€ã®ãã¡ã€ã«ãå¿ èŠã§ãã
⢠BuildKitãã©ã«ããŒ-å«ãŸãããã®ïŒ
- jdk12ãã¢ããªã±ãŒã·ã§ã³ã®èµ·åã«äœ¿çšãããŸãïŒJVMïŒã
- geckodriver.exe-Selenium Web DriverãFireFoxãã©ãŠã¶ãŒã§åäœããããã«ããŸãã
- SprintAutoTest.jar-ã¢ããªã±ãŒã·ã§ã³ã€ã³ã¹ã¿ã³ã¹çŽæ¥
⢠ã¬ããŒããã©ã«ããŒ-ã¢ããªã±ãŒã·ã§ã³ããã¹ãã±ãŒã¹ãå®äºãããšãã¬ããŒããä¿åãããŸãã ãŸãããšã©ãŒãçºçããå Žåã«ã¹ã¯ãªãŒã³ã·ã§ãããä¿åãããErrorScreensãã©ã«ããŒãå«ãŸããŠããå¿ èŠããããŸãã
⢠TestSuiteãã©ã«ããŒ-Webããã±ãŒãžãjavascriptãäžé£ã®ãã¹ãã±ãŒã¹ïŒãã®ãã©ã«ããŒãžã®å ¥åã«ã€ããŠã¯ãå¥é詳ãã説æããŸãïŒ
â¢config.propertiesãã¡ã€ã«-OracleããŒã¿ããŒã¹ã«æ¥ç¶ããããã®æ§æãšãWebDriverWaitã«å¯Ÿããæ瀺çãªæåŸ å€ãå«ãŸããŠããŸã
â¢starter.bat-ã¢ããªã±ãŒã·ã§ã³ãèµ·åãããã¡ã€ã«ïŒæåŸã«ãã©ã¡ãŒã¿ãšããŠTestCaseãšããååãå ¥åãããšãTestCaseãæåã§æå®ããã«ã¢ããªã±ãŒã·ã§ã³ãèªåçã«èµ·åã§ããŸãïŒã
ã¢ããªã±ãŒã·ã§ã³ã®ç°¡åãªèª¬æ
ã¢ããªã±ãŒã·ã§ã³ã¯ããã©ã¡ãŒã¿ïŒTestCaseãšããååïŒã䜿çšããŠããŸãã¯ãã©ã¡ãŒã¿ãªãã§èµ·åã§ããŸãããã®å Žåããã¹ãã±ãŒã¹ã®ååãã³ã³ãœãŒã«ã«èªåã§å ¥åããå¿ èŠããããŸãã
ãã©ã¡ãŒã¿ãŒãªãã§å®è¡ããbatãã¡ã€ã«ã®äžè¬çãªå 容ã®äŸïŒstart "AutoTest launcher"ïŒ cdïŒ \ BuildKit \ jdk-12 \ bin \ java.exe -Xmx768M -jar --enable-previewïŒ cdïŒ \ BuildKit \ SprintAutoTest.jar
ã¢ããªã±ãŒã·ã§ã³ã®äžè¬çãªèµ·åæã«ãã\ TestSuite \ TestCaseããã£ã¬ã¯ããªã«ããxmlãã¡ã€ã«ã確èªããŸãïŒãµããã©ã«ããŒã®å 容ã¯è¡šç€ºãããŸããïŒã ãã®å Žåãæ§é ã®æ£ç¢ºæ§ã«å¯Ÿããxmlãã¡ã€ã«ã®ãã©ã€ããªæ€èšŒãè¡ããïŒã€ãŸããxmlããŒã¯ã¢ããã®èŠ³ç¹ããã®ãã¹ãŠã®ã¿ã°ãæ£ããïŒããtestCaseNameãã¿ã°ã«ç€ºãããååãååŸãããŸãããã®åŸããŠãŒã¶ãŒã¯äœ¿çšå¯èœãªãã¹ãã®å¯èœãªååã®1ã€ãå ¥åããããã«æ±ããããŸãã±ãŒã¹ã å ¥åã«èª€ããããå Žåãã·ã¹ãã ã¯ååã®åå ¥åãæ±ããŸãã
TestCaseãšããååãåãåã£ãåŸãå éšã¢ãã«ãæ§ç¯ãããŸããããã¯ãTestCaseïŒãã¹ãã¹ã¯ãªããïŒ-Webãªããžã§ã¯ãïŒèŠçŽ ã®ã¹ãã¬ãŒãžïŒã®æã§ãããJavaãªããžã§ã¯ãã®åœ¢åŒã§ãã ã¢ãã«ã®æ§ç¯åŸãTestCaseïŒããã°ã©ã ã®å®è¡å¯èœãªããžã§ã¯ãïŒãçŽæ¥æ§ç¯ãããŸãã TestCaseã®æ§ç¯æ®µéã§ã2次æ€èšŒãè¡ãããŸããTestCaseã§æå®ããããã¹ãŠã®ãã©ãŒã ãé¢é£ããWebPackageã«ãããã¢ã¯ã·ã§ã³ã§æå®ããããã¹ãŠã®èŠçŽ ãæå®ãããããŒãžå ã®WebPackageã«ããããšã確èªããŸãã ïŒTestCaseããã³WebPackageã®æ§é ã«ã€ããŠã¯ã以äžã§è©³ãã説æããŸãïŒ
TestCaseã®ãã«ãåŸãã¹ã¯ãªãããçŽæ¥å®è¡ãããŸã
ã¹ã¯ãªããæäœã¢ã«ãŽãªãºã ïŒããŒããžãã¯ïŒ
TestCaseã¯Actionãšã³ãã£ãã£ã®ã³ã¬ã¯ã·ã§ã³ã§ãããããã¯ã€ãã³ããšã³ãã£ãã£ã®ã³ã¬ã¯ã·ã§ã³ã§ãã
ãã¹ãã±ãŒã¹
->ãªã¹ã{ã¢ã¯ã·ã§ã³}
->ãªã¹ã{ã€ãã³ã}
TestCaseãéå§ããããšãã¢ã¯ã·ã§ã³ãé çªã«éå§ãããŸãïŒåã¢ã¯ã·ã§ã³ã¯è«ççµæãè¿ããŸãïŒ
ã¢ã¯ã·ã§ã³ãéå§ããããšãã€ãã³ããé çªã«éå§ãããŸãïŒåã€ãã³ãã¯è«ççµæãè¿ããŸãïŒ
åã€ãã³ãã®çµæã«ãããçµæãä¿åãããŸãã
ãããã£ãŠããã¹ãã¯ããã¹ãŠã®ã¢ã¯ã·ã§ã³ãæ£åžžã«å®äºãããšãããŸãã¯ã¢ã¯ã·ã§ã³ãfalseãè¿ãããšãã«å®äºããŸãã
*ã¯ã©ãã·ã¥ã¡ã«ããºã
ãªããªã ãã¹ã察象ã®ã·ã¹ãã ã¯å€ãããšã©ãŒã§ã¯ãªããšã©ãŒ/ãã°ããã£ããããäžéšã®ã€ãã³ãã¯åããŠåäœããŸããããã©ãããã©ãŒã ã«ã¯ãå³å¯ã«ç·åœ¢ãªãã¹ããšããäžèšã®æŠå¿µããéžè±ããã¡ã«ããºã ããããŸãïŒãã ããå³å¯ã«åæå®ãããŠããŸãïŒã ãã®ãããªãšã©ãŒããã£ããããå Žåãæåã«ã±ãŒã¹ãç¹°ãè¿ããè¿œå ã®ã¢ã¯ã·ã§ã³ãå®è¡ããŠã¢ã¯ã·ã§ã³ãç¹°ãè¿ãããšãã§ããŸã
ã¢ããªã±ãŒã·ã§ã³ã®æåŸã«ã¬ããŒããçæãããã\ Reportsããã£ã¬ã¯ããªã«ä¿åãããŸãã ãšã©ãŒãçºçããå Žåãã¹ã¯ãªãŒã³ã·ã§ãããæ®ãããã\ Reports \ ErrorScreensãã«ä¿åãããŸã
TestSuite Filling
ã ããããã¹ãã®èª¬æã æ¢ã«è¿°ã¹ãããã«ãå®è¡ã«å¿ èŠãªäž»ãªãã©ã¡ãŒã¿ãŒã¯ãå®è¡ãããã¹ãã®ååã§ãã ãã®ååã¯ããã£ã¬ã¯ããªã/ TestSuite / TestCaseãã®xmlãã¡ã€ã«ã«ä¿åãããŸãã ãã¹ãŠã®ãã¹ãã¹ã¯ãªããã¯ãã®ãã£ã¬ã¯ããªã«ä¿åãããŸãã ãããã¯ããã€ãã£ãŠãããŸããŸããã ãã¹ãã±ãŒã¹ã®ååã¯ããã¡ã€ã«åããã§ã¯ãªãããã¡ã€ã«å ã®ãtestCaseNameãã¿ã°ããååŸãããŸãã
TestCaseã¯ãæ£ç¢ºã«äœãè¡ãããèšå®ããŸãã ã¢ã¯ã·ã§ã³ã xmlãã¡ã€ã«ã®ãã£ã¬ã¯ããªã/ TestSuite / WebPackageãã«ã¯ããã¹ãŠã®ãã±ãŒã¿ãŒãä¿åãããŸãã ã€ãŸã ãã¹ãŠæé«ã®äŒçµ±-ã¢ã¯ã·ã§ã³ã¯åå¥ã«ä¿åãããWebãã©ãŒã ãã±ãŒã¿ãŒã¯åå¥ã«ä¿åãããŸãã
TestCaseã¯ãWebPackageåããwebPackageNameãã¿ã°ã«ãä¿åããŸãã
å šäœåã¯ãã§ã«ããã«ãããŸãã å®è¡ããã«ã¯ãTestCaseãšWebPackageã®2ã€ã®xmlãã¡ã€ã«ãå¿ èŠã§ãã 圌ãã¯æãäœããŸãã WebPackageã¯ç¬ç«ããŠããŸã-èå¥åã¯ã¿ã°ãwebPackageNameãå ã®ååã§ãã ãããã£ãŠãããã«æåã®ã«ãŒã«ããããŸã-TestCaseãšWebPackageã®ååã¯äžæã§ãªããã°ãªããŸããã ã€ãŸã ç¹°ãè¿ããŸãããå®éã«ã¯ããã¹ãã¯TestCaseãšWepPackageãã¡ã€ã«ã®æã§ãããTestCaseã§æå®ãããWebPackageåã§æ¥ç¶ãããŠããŸãã å®éã«ã¯ã1ã€ã®ã·ã¹ãã ãèªååãããã¹ãŠã®ãã¹ãã±ãŒã¹ã1ã€ã®WebPackageã«ãŸãšããŠããã¹ãŠã®ãã©ãŒã ã®èª¬æãå±±ç©ã¿ã«ããŸãã
è«çå解ã®æ¬¡ã®å±€ã¯ãããŒãžãªããžã§ã¯ããªã©ã®ãã¿ãŒã³ã«åºã¥ããŠããŸãã
ããŒãžãªããžã§ã¯ã
ããŒãžãªããžã§ã¯ãã¯ãèªååã§æãæçšã§äœ¿çšãããŠããã¢ãŒããã¯ãã£ãœãªã¥ãŒã·ã§ã³ã®1ã€ã§ãã ãã®èšèšãã¿ãŒã³ã¯ãåã
ã®ããŒãžèŠçŽ ã§äœæ¥ãã«ãã»ã«åããã®ã«åœ¹ç«ã¡ãŸãã ããŒãžãªããžã§ã¯ãã¯ããã¹ã察象ã®ã¢ããªã±ãŒã·ã§ã³ã®ããŒãžããªããžã§ã¯ããšããŠã·ãã¥ã¬ãŒãããŸãã
ããžãã¯ãšå®è£ ã®åé¢
ãã¹ãããžãã¯ïŒãã§ãã¯å¯Ÿè±¡ïŒãšãã®å®è£ ïŒãã§ãã¯æ¹æ³ïŒã«ã¯å€§ããªéãããããŸãã ãã¹ãã·ããªãªã®äŸïŒããŠãŒã¶ãŒãééã£ããŠãŒã¶ãŒåãŸãã¯ãã¹ã¯ãŒããå ¥åãããã°ã€ã³ãã¿ã³ãæŒãããšã©ãŒã¡ãã»ãŒãžãåãåããŸããã ãã®ã¹ã¯ãªããã¯ãã¹ãã®ããžãã¯ãèšè¿°ããŸãããå®è£ ã«ã¯ããŒãžäžã®å ¥åãã£ãŒã«ãã®æ€çŽ¢ãå ¥åããšã©ãŒã®ãã§ãã¯ãªã©ã®ã¢ã¯ã·ã§ã³ãå«ãŸããŸãã ãŸããããšãã°ããšã©ãŒã¡ãã»ãŒãžã®è¡šç€ºæ¹æ³ãå€æŽãããŠãããã¹ãã¹ã¯ãªããã«åœ±é¿ããªãå Žåã¯ã誀ã£ãããŒã¿ãå ¥åãããã°ã€ã³ãã¿ã³ãæŒããŠãšã©ãŒã確èªããå¿ èŠããããŸãã ãã ããããã¯ãã¹ãã®å®è£ ã«çŽæ¥åœ±é¿ããŸãããšã©ãŒã¡ãã»ãŒãžãåä¿¡ããŠââåŠçããã¡ãœãããå€æŽããå¿ èŠããããŸãã ãã¹ãã®ããžãã¯ãå®è£ ããåé¢ããããšã«ãããèªåãã¹ãã¯ããæè»ã«ãªããååãšããŠä¿å®ã容æã«ãªããŸãã
*ïŒ ãã®ã¢ãŒããã¯ãã£ã®ã¢ãããŒããå®å šã«é©çšããããšã¯èšããŸããã ãã¹ãã·ããªãªã®èª¬æãããŒãžããšã«å解ããã ãã§ããããã«ããããã¹ããããéãèšè¿°ãããã¹ãŠã®ããŒãžã«èªåãã§ãã¯ãè¿œå ãããã±ãŒã¿ãŒã®æ£ãã説æãåºæ¿ãïŒç°ãªãããŒãžã§åãã§ã¯ãªãããã«ïŒããã¹ãã®ãçŸãããè«çæ§é ãæ§ç¯ããŸãã ãã©ãããã©ãŒã èªäœã¯ããã¯ãªãŒã³ã¢ãŒããã¯ãã£ãã®ååã«åºã¥ããŠå®è£ ãããŠããŸã
ããžãã¯ãšå®è£ ã®åé¢
ãã¹ãããžãã¯ïŒãã§ãã¯å¯Ÿè±¡ïŒãšãã®å®è£ ïŒãã§ãã¯æ¹æ³ïŒã«ã¯å€§ããªéãããããŸãã ãã¹ãã·ããªãªã®äŸïŒããŠãŒã¶ãŒãééã£ããŠãŒã¶ãŒåãŸãã¯ãã¹ã¯ãŒããå ¥åãããã°ã€ã³ãã¿ã³ãæŒãããšã©ãŒã¡ãã»ãŒãžãåãåããŸããã ãã®ã¹ã¯ãªããã¯ãã¹ãã®ããžãã¯ãèšè¿°ããŸãããå®è£ ã«ã¯ããŒãžäžã®å ¥åãã£ãŒã«ãã®æ€çŽ¢ãå ¥åããšã©ãŒã®ãã§ãã¯ãªã©ã®ã¢ã¯ã·ã§ã³ãå«ãŸããŸãã ãŸããããšãã°ããšã©ãŒã¡ãã»ãŒãžã®è¡šç€ºæ¹æ³ãå€æŽãããŠãããã¹ãã¹ã¯ãªããã«åœ±é¿ããªãå Žåã¯ã誀ã£ãããŒã¿ãå ¥åãããã°ã€ã³ãã¿ã³ãæŒããŠãšã©ãŒã確èªããå¿ èŠããããŸãã ãã ããããã¯ãã¹ãã®å®è£ ã«çŽæ¥åœ±é¿ããŸãããšã©ãŒã¡ãã»ãŒãžãåä¿¡ããŠââåŠçããã¡ãœãããå€æŽããå¿ èŠããããŸãã ãã¹ãã®ããžãã¯ãå®è£ ããåé¢ããããšã«ãããèªåãã¹ãã¯ããæè»ã«ãªããååãšããŠä¿å®ã容æã«ãªããŸãã
*ïŒ ãã®ã¢ãŒããã¯ãã£ã®ã¢ãããŒããå®å šã«é©çšããããšã¯èšããŸããã ãã¹ãã·ããªãªã®èª¬æãããŒãžããšã«å解ããã ãã§ããããã«ããããã¹ããããéãèšè¿°ãããã¹ãŠã®ããŒãžã«èªåãã§ãã¯ãè¿œå ãããã±ãŒã¿ãŒã®æ£ãã説æãåºæ¿ãïŒç°ãªãããŒãžã§åãã§ã¯ãªãããã«ïŒããã¹ãã®ãçŸãããè«çæ§é ãæ§ç¯ããŸãã ãã©ãããã©ãŒã èªäœã¯ããã¯ãªãŒã³ã¢ãŒããã¯ãã£ãã®ååã«åºã¥ããŠå®è£ ãããŠããŸã
次ã«ãWebPackageãšTestCaseã®æ§é ã詳ãã説æããªãããã«ããŸãã 圌ãã®ããã«ãWebPackageçšã®DTDã¹ããŒããšTestCaseçšã®XSD 1.1ãäœæããŸããã
ïŒ éèŠãª
DTDããã³XSDã¹ããŒã ãç¶æããããšã«ãããè¿ éãªãã¹ãäœæã®æŠå¿µãå®è£ ãããŸãã
WebPackageãšTestCaseãçŽæ¥èšè¿°ããå Žåãã¿ã°ã®èªåçææ©èœãåããçµã¿èŸŒã¿ã®ãªã¢ã«ã¿ã€ã DTDããã³XSDæ€èšŒæ©èœãåããxml Editorã䜿çšããå¿ èŠããããŸããããã«ãããèªåãã¹ãã®èšè¿°ããã»ã¹èªäœãå€§å¹ ã«èªååãããŸãïŒå¿ èŠãªãã¹ãŠã®ã¿ã°ãèªåçã«çœ®ãæããããå±æ§å€ã®ããããããŠã³ãªã¹ãã衚瀺ãããŸãïŒå¯èœãªå€ã¯ã察å¿ããã¿ã°ãçæãããã€ãã³ãã®ã¿ã€ãã«å¿ããŠïŒ ã
ãããã®ã¹ããŒã ãxmlãã¡ã€ã«èªäœã«ããã蟌ãŸãããŠããå Žåãç¹å¥ãªç°å¢ã䜿çšãããšãxmlãã¡ã€ã«ã®æ§é ã®æ£ç¢ºããå¿ããããšããããŸãã ç§ãéžãã ã®ã¯oXygen XLM Editorã§ããã ç¹°ãè¿ããŸããããã®ãããªããã°ã©ã ã䜿çšããªããšãæžã蟌ã¿é床ã®æ¬è³ªãç解ã§ããŸããã ã¢ã€ãã¢ã¯ããã«ã¯ããŸãé©ããŠããŸããã TestCaseã®éµãšãªãXSD 1.1ã®ã代æ¿ãã³ã³ã¹ãã©ã¯ãã¯åŠçããŸããã
Webpackage
WebPackaege-ãã£ã¬ã¯ããªã\ TestSuite \ WebPackageãã«ããWebãã©ãŒã ã®èŠçŽ ãèšè¿°ããxmlãã¡ã€ã«ã ïŒå¥œããªã ããã¡ã€ã«ãäœæã§ããŸãããã¡ã€ã«ã®ååã¯äœã§ãæ§ããŸãã-å 容ã ããéèŠã§ãïŒã
DTDïŒããã¥ã¡ã³ãã®åé ã«æ¿å
¥ïŒïŒ
<!DOCTYPE webPackage [ <!ELEMENT webPackage (webPackageName, forms)> <!ELEMENT webPackageName (#PCDATA)> <!ELEMENT forms (form+)> <!ELEMENT form (formName, elements+)> <!ELEMENT formName (#PCDATA)> <!ELEMENT elements (element+)> <!ELEMENT element (name, locator)> <!ATTLIST element type (0|1|2|3|4|5|6|7) #REQUIRED> <!ATTLIST element alwaysVisible (0|1) #IMPLIED> <!ELEMENT name (#PCDATA)> <!ELEMENT locator (#PCDATA)> <!ATTLIST locator type (1|2) #IMPLIED> ]>
äžè¬çã«ããããã
<webPackage> <webPackageName>_</webPackageName> <forms> <form> <formName>______</formName> <elements> <element type="2" alwaysVisible="1"> <name>_</name> <locator type="2">.//div/form/div/div/form/table/tbody/tr/td[text()=""]/following-sibling::td/input</locator> </element> <element type="2"> <name>__</name> <locator>.//div/form/div/div/form/table/tbody/tr/td[text()=""]/following-sibling::td/input</locator> </element> ....... </elements> </form> ....... </forms> </webPackage>
æ¢ã«è¿°ã¹ãããã«ãèŠçŽ ãããŒãå ã«ãªãããã«-ãã¹ãŠãWebãã©ãŒã ã«åŸã£ãŠå解ãããŸã
ããŒãšã³ãã£ãã£ã¯
<element>
èŠçŽ ã¿ã°ã«ã¯2ã€ã®å±æ§ããããŸãã
- ã¿ã€ã
- åžžã«èŠãã
typeå±æ§ã¯å¿ é ã§ãããèŠçŽ ã®ã¿ã€ããæå®ããŸãã ãã©ãããã©ãŒã ã§ããã€ãã¿ã€ããèšå®ããŸã
çŸæç¹ã§ã¯ãç¹ã«ãã©ãããã©ãŒã ã§èªåã®ããã«ã次ã®ã¿ã€ããå®è£ ããŠããŸãã
â¢0-æ©èœçãªæå³ã¯ãããŸãããéåžžãäœããã®çš®é¡ã®ç¢æã§ãã
â¢1-ãã¿ã³ïŒãã¿ã³ïŒ
â¢2-å ¥åãã£ãŒã«ãïŒå ¥åïŒ
â¢3-ãã§ãã¯ããã¯ã¹ïŒcheckBoxïŒ
â¢4-ããããããŠã³ãªã¹ãïŒéžæïŒ-å®éã«ã¯å®è£ ãããŠããŸãããããã®å Žæãæ®ããŸãã
â¢5-srmããããããŠã³ãªã¹ãã®å ŽåïŒååãèšè¿°ããå€ã衚瀺ããããŸã§åŸ æ©ããŸã-ç¹å®ã®xpathãã³ãã¬ãŒãã«åŸã£ãŠéžæããŸã-ã·ã¹ãã åºæã®ã¿ã€ã
â¢6-srm select-æ€çŽ¢ãªã©ã®äžè¬çãªæ©èœã§äœ¿çšãããŸãã -ç§ã®ã·ã¹ãã å°çšã®å ¥å
alwaysVisibleå±æ§ïŒãªãã·ã§ã³ïŒã¯ãèŠçŽ ãåžžã«ãã©ãŒã ã«ååšãããã©ããã瀺ããã¢ã¯ã·ã§ã³ã®åæ/æçµæ€èšŒäžã«äœ¿çšã§ããŸãïŒã€ãŸããèªåã¢ãŒãã§ã¯ããã©ãŒã ãéãããšãã«ããã©ãŒã äžã«åžžã«ãããã¹ãŠã®èŠçŽ ãå«ãŸããŠããããšã確èªã§ããŸãïŒãã©ãŒã ããããã®èŠçŽ ã¯ãã¹ãŠæ¶ããŸããïŒ
å¯èœãªå€ïŒ
- 0-ããã©ã«ãïŒãŸãã¯å±æ§ãèšå®ãããŠããªãå ŽåïŒ-èŠçŽ ãããŒãžäžã«ãªãå¯èœæ§ãããïŒæ€èšŒããªãïŒ
- 1-èŠçŽ ã¯åžžã«ããŒãžã«ååšããŸã
ãªãã·ã§ã³ã®ãªãã·ã§ã³ã®typeå±æ§ã¯ããã±ãŒã¿ãŒã¿ã°ã§å®è£ ãããŸã
å¯èœãªå€ïŒ
- 1-IDã§èŠçŽ ãæ€çŽ¢ããŸãïŒããããããã±ãŒã¿ãŒã§IDã®ã¿ãæå®ããŸãïŒ
- 2-ããã©ã«ãã§ïŒãŸãã¯å±æ§ãèšå®ãããŠããªãå ŽåïŒ-xpathã§æ€çŽ¢-xpathã§ã®æ€çŽ¢ã®ã¿ã䜿çšããããšããå§ãããŸãã ãã®æ¹æ³ã¯ãæ®ãã®ã»ãŒãã¹ãŠã®å©ç¹ãçµã¿åãããŠãããæ®éç
ãã¹ãã±ãŒã¹
TestCase-ãã¹ãã¹ã¯ãªããèªäœãèšè¿°ããxmlãã¡ã€ã«ã¯ãã\ TestSuite \ TestCaseããã£ã¬ã¯ããªã«ãããŸãïŒå¥œããªã ããã¡ã€ã«ãäœæã§ããŸãããã¡ã€ã«åã¯ä»»æã§ã-å 容ã®ã¿ãéèŠã§ãïŒã
XSDåè·¯ïŒ
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.1"> <xs:element name="testCase"> <xs:complexType> <xs:sequence> <xs:element name="testCaseName" type="xs:string"/> <xs:element name="webPackageName" type="xs:string"/> <xs:element name="actions" type="actionsType"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="actionsType"> <xs:sequence> <xs:element name="action" type="actionType" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="actionType"> <xs:sequence> <xs:element name="name" type="xs:string"/> <xs:element name="orderNumber" type="xs:positiveInteger"/> <xs:element name="runConfiguration" type="runConfigurationType"/> </xs:sequence> </xs:complexType> <xs:complexType name="runConfigurationType"> <xs:sequence> <xs:element name="formName" type="xs:string"/> <xs:element name="repeatsOnError" type="xs:positiveInteger" minOccurs="0"/> <xs:element name="events" type="eventsType"/> <xs:element name="exceptionBlock" type="eventsType" minOccurs="0"/> </xs:sequence> <xs:attribute name="openValidation" use="required"> <xs:simpleType> <xs:restriction base="xs:byte"> <xs:enumeration value="1"/> <xs:enumeration value="0"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="closeValidation" use="required"> <xs:simpleType> <xs:restriction base="xs:byte"> <xs:enumeration value="1"/> <xs:enumeration value="0"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> <xs:complexType name="eventBaseType"> <xs:sequence> <xs:element name="orderNumber" type="xs:positiveInteger"/> </xs:sequence> <xs:attribute name="type" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="goToURL"/> <xs:enumeration value="checkElementsVisibility"/> <xs:enumeration value="checkElementsInVisibility"/> <xs:enumeration value="fillingFields"/> <xs:enumeration value="clickElement"/> <xs:enumeration value="dbUpdate"/> <xs:enumeration value="wait"/> <xs:enumeration value="scrollDown"/> <xs:enumeration value="userInput"/> <xs:enumeration value="checkInputValues"/> <xs:enumeration value="checkQueryResultWithUtilityValue"/> <xs:enumeration value="checkFieldsPresenceByQueryResult"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="invertResult" use="optional" default="0"> <xs:simpleType> <xs:restriction base="xs:byte"> <xs:enumeration value="1"/> <xs:enumeration value="0"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="hasExceptionBlock" use="optional" default="0"> <xs:simpleType> <xs:restriction base="xs:byte"> <xs:enumeration value="1"/> <xs:enumeration value="0"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> <xs:complexType name="eventsType"> <xs:sequence> <xs:element name="event" type="eventBaseType" maxOccurs="unbounded"> <xs:alternative test="@type='goToURL'" type="eventGoToURL"/> <xs:alternative test="@type='checkElementsVisibility'" type="eventCheckElementsVisibility"/> <xs:alternative test="@type='checkElementsInVisibility'" type="eventCheckElementsVisibility"/> <xs:alternative test="@type='fillingFields'" type="eventFillingFields"/> <xs:alternative test="@type='checkInputValues'" type="eventFillingFields"/> <xs:alternative test="@type='clickElement'" type="eventClickElement"/> <xs:alternative test="@TYPE='dbUpdate'" type="eventRequest"/> <xs:alternative test="@type='wait'" type="utilityValueInteger"/> <xs:alternative test="@type='scrollDown'" type="eventClickElement"/> <xs:alternative test="@type='userInput'" type="eventClickElement"/> <xs:alternative test="@type='checkQueryResultWithUtilityValue'" type="eventRequestWithValue"/> <xs:alternative test="@type='checkFieldsPresenceByQueryResult'" type="eventRequestWithValue"/> </xs:element> </xs:sequence> </xs:complexType> <!-- EVENTS --> <xs:complexType name="eventGoToURL"> <xs:complexContent> <xs:extension base="eventBaseType"> <xs:sequence> <xs:element name="url" type="xs:anyURI"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="eventCheckElementsVisibility"> <xs:complexContent> <xs:extension base="eventBaseType"> <xs:sequence> <xs:element name="fields" type="fieldType"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="eventFillingFields"> <xs:complexContent> <xs:extension base="eventBaseType"> <xs:sequence> <xs:element name="fields" type="fieldTypeWithValue"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="eventClickElement"> <xs:complexContent> <xs:extension base="eventBaseType"> <xs:sequence> <xs:element name="elementName" type="xs:string"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="eventRequest"> <xs:complexContent> <xs:extension base="eventBaseType"> <xs:sequence> <xs:element name="dbRequest" type="xs:string"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="utilityValueInteger"> <xs:complexContent> <xs:extension base="eventBaseType"> <xs:sequence> <xs:element name="utilityValue" type="xs:positiveInteger"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="eventRequestWithValue"> <xs:complexContent> <xs:extension base="eventBaseType"> <xs:sequence> <xs:element name="dbRequest" type="xs:string"/> <xs:element name="utilityValue" type="xs:string"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <!-- EVENTS --> <xs:complexType name="fieldType"> <xs:sequence> <xs:element name="field" maxOccurs="unbounded"> <xs:complexType> <xs:choice> <xs:element name="element" type="xs:string"/> <xs:element name="xpath" type="xs:string"/> </xs:choice> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="fieldTypeWithValue"> <xs:sequence> <xs:element name="field" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="element" type="xs:string"/> <xs:element name="value" type="valueType"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="valueType"> <xs:complexContent> <xs:extension base="xs:anyType"> <xs:attribute name="type" use="optional" default="1"> <xs:simpleType> <xs:restriction base="xs:byte"> <xs:enumeration value="1"/> <xs:enumeration value="2"/> <xs:enumeration value="3"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:extension> </xs:complexContent> </xs:complexType> </xs:schema>
äžè¬çãªãã¥ãŒïŒ
<!DOCTYPE testCase SYSTEM "./TestSuite/TestCase/entities.dtd" []> <testCase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="testShema.xsd"> <testCaseName>__testCase</testCaseName> <webPackageName>_webPackage__webPackageName</webPackageName> <actions> <action> <name> </name> <orderNumber>10</orderNumber> <runConfiguration openValidation="1" closeValidation="1"> <formName>______</formName> <events> <event type="goToURL"> <orderNumber>10</orderNumber> <url>&srmURL;</url> </event> ....... </events> </runConfiguration> </action> ....... </actions> </testCase>
ãã®è¡ã§ã¯ãXMLãšãã£ã¿ãŒã«è¡šç€ºãããããã«xsdã¹ããŒã ãåºå®ããæ¹æ³ã確èªã§ããŸãã
<testCase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="testShema.xsd">
TestCaseã§ã¯ãåããã£ã¬ã¯ããªïŒæ¡åŒµå.dtdã®ãã¡ã€ã«ïŒã«åå¥ã«ä¿åãããŠããDTDãšã³ãã£ãã£ã䜿çšããŸãã ãã®äžã«ãã»ãŒãã¹ãŠã®ããŒã¿ïŒå®æ°ïŒãæ ŒçŽããŸãã ãŸããæ°ãããã¹ããèµ·åããããã«ããžãã¯ãæ§ç¯ããŸããããã¹ãäžãæ°ããäžæã®ãšã³ãã£ãã£ãäœæãããæ°ããå®å®è¹ãç»é²ããããã®ãã¡ã€ã«ã®1æ¡ãå€æŽããã ãã§ååã§ããã
ãã®æ§é ã¯éåžžã«åçŽã§ããäŸãæããŸãã
<?xml version="1.0" encoding="UTF-8"?> <!ENTITY mainNumber '040'> <!ENTITY mail '@mail.ru'> <!ENTITY srmURL 'https://srm-test.ru'>
ãã®ãããªå®æ°ã¯ã次ã®ããã«ã¿ã°å€ã«æ¿å ¥ãããŸãã
<url>&srmURL;</url>
-çµã¿åãããããšãã§ããŸãã
ïŒ æšå¥šäºé -testCaseãäœæãããšãã¯ãããã¥ã¡ã³ãå ã§ãããã®DTDãšã³ãã£ãã£ãæå®ãããã¹ãŠãå®å®ããŠæ©èœããåŸãå¥ã®ãã¡ã€ã«ã«è»¢éããå¿ èŠããããŸãã ç§ã®xmlãšãã£ã¿ãŒã¯ããã«åé¡ããããŸã-DTDãèŠã€ããããšãã§ãããXSDãèæ ®ããŸãã
testCase
testCase-æã芪ã¿ã°ã«å«ãŸãããã®ïŒ
- testCaseName-ãã¹ãã±ãŒã¹ã®ååããã®ãã©ã¡ãŒã¿ãŒã¯ã¢ããªã±ãŒã·ã§ã³å ¥åã«æž¡ãããŸã
- webPackageName -webPackageNameã§æå®ãããWebPackageã®ååïŒWebPackageã®äžã®æ®µèœãåç §ïŒ
- ã¢ã¯ã·ã§ã³ -ã¢ã¯ã·ã§ã³ãšã³ãã£ãã£ã³ã³ãã
è¡å
å«ãŸãããã®ïŒ
- name -name-ãã©ãŒã ã®ååãšããŒã¢ã¯ã·ã§ã³ãæå®ããããšããå§ãããŸã-äœãšçç±
- orderNumber-ã·ãªã¢ã«çªå·-ã¢ã¯ã·ã§ã³ã®äžŠã¹æ¿ãã«å¿ èŠãªãã©ã¡ãŒã¿ãŒïŒç¹å®ã®ããŒã«ã䜿çšããŠJavaã§xmlã解æããå Žåã解æããã«ãã¹ã¬ããç°å¢ã§å®è¡ã§ãããããé åºãå€æŽã§ããããïŒ-次ã®ã¢ã¯ã·ã§ã³ãæå®ãããšãã«ãžã£ã³ãã§ããŸã-ã€ãŸã 䞊ã¹æ¿ããéã«éèŠãªã®ã¯ãå€ããå°ãªãããã ããªã®ã§ãçªå·ä»ãå šäœãå€æŽããããšãªãããã§ã«èª¬æãããŠãããã®ã®éã§ã¢ã¯ã·ã§ã³ãå®è¡ããããšãã§ããŸãã
- runConfiguration-ã¢ã¯ã·ã§ã³ã®äžéšãšããŠäœãèµ·ãããã®å®éã®èª¬æ
runConfiguration
å«ãŸãããã®ïŒ
- openValidationå±æ§-ãªãã·ã§ã³ãããã©ã«ãã¯ã0ã
- 0-åæãã©ãŒã æ€èšŒãå®è¡ããŸãã
- 1-åæãã©ãŒã æ€èšŒ
- å±æ§closeValidation-ãªãã·ã§ã³ãããã©ã«ãã¯ã0ã
- 0-æçµçãªãã©ãŒã æ€èšŒãå®è¡ããŸãã
- 1-æçµçãªãã©ãŒã æ€èšŒ
- formName-ã¢ã¯ã·ã§ã³ãå®è¡ããããã©ãŒã ã®åå-WebPackageã®formNameã®å€
- repeatsOnError-ãªãã·ã§ã³ã倱æããå Žåã«å®è¡ããå¿ èŠã®ããå埩åæ°ã瀺ããŸã
- ã€ãã³ã -ã€ãã³ããšã³ãã£ãã£ã³ã³ãã
- exceptionBlock-ãªãã·ã§ã³-ãšã©ãŒãçºçããå Žåã«å®è¡ãããã€ãã³ããšã³ãã£ãã£ã®ã³ã³ãã
åºæ¥äº
æå°æ§é åäœ-ãã®ãšã³ãã£ãã£ã¯ãå®è¡ãããã¢ã¯ã·ã§ã³ã瀺ããŸã
åã€ãã³ãã¯ç¹å¥ã§ãããäžæã®ã¿ã°ãšå±æ§ãæã€ããšãã§ããŸãã
åºæ¬ã¿ã€ãã«ã¯ä»¥äžãå«ãŸããŸãã
- ã¿ã€ãå±æ§-èŠçŽ ã®ã¿ã€ãã瀺ããŸã
- hasExceptionBlockå±æ§ã¯ãªãã·ã§ã³ã®å±æ§ã§ããããã©ã«ãã§ã¯ãé害ã¡ã«ããºã ãå®è£
ããããã«ã0ããå¿
èŠã§ã-å±æ§ã¯ããã®ã€ãã³ãã§ãšã©ãŒãçºçããå¯èœæ§ãããããšã瀺ããŸã
- 0-ãšã©ãŒãªã
- 1-ã¢ã¯ã·ã§ã³ã§ãšã©ãŒãçºçããå¯èœæ§ããããŸã
- å±æ§invertResult-ãªãã·ã§ã³ã®å±æ§ãããã©ã«ãã¯ã0ã-å±æ§ã¯ãã€ãã³ãã®çµæãå€æŽããå¿
èŠãããããšã瀺ããŸã
- 0-ã€ãã³ãã®çµæãæ®ã
- 1-ã€ãã³ãã®çµæãå察ã«å€æŽããŸã
*ïŒ äºæ³ããããšã©ãŒã説æããã¡ã«ããºã
ç§ãæåã«ããã䜿çšããå Žæãšããããæ©èœãããããã«äœããã¹ãããšããäºçŽ°ãªäŸãæããŸãããã
ã±ãŒã¹ïŒãã£ããã£å ¥åã ãã®ç¬éãèªååããããšã¯ã§ããŸããã§ãããã€ãŸãããããŸã§ã®ãšããããããã®ã¯ã©ãã·ã¥ãã§ãã¯ã¯ã¯ã©ãã·ã¥ããŸããããã£ããã£ãã¹ããµãŒãã¹ãæžããŠãããŸããã§ããïŒãã ããèªèã®ããã«ãã¥ãŒã©ã«ãããã¯ãŒã¯ãäœæããæ¹ãç°¡åã§ãïŒïŒã ãã®å Žåãã³ã³ãããŒã«ã€ãã³ããäœæããŸãããã®ã€ãã³ãã§ã¯ãèŠçŽ ããªãããšã確èªããŸã-äžæ£ãªã³ã³ãããŒã«ã³ãŒãã«é¢ããéç¥ãhasExceptionBlockå±æ§ãèšå®ããŸãã 以åã¯ãããã€ãã®ç¹°ãè¿ãïŒ5ïŒãå®è¡ã§ããããã«ã¢ã¯ã·ã§ã³ãèŠæ±ããŸããããçµå±ãexceptionBlockãäœæããŸããã
ç§ã®æèããã®äŸã
ã€ãã³ãã®ç»é²æ¹æ³ã¯æ¬¡ã®ãšããã§ãã
ãããŠãããã§exceptionBlock after events
ãããŠãã¯ãã1ããŒãžã®ã¢ã¯ã·ã§ã³ã¯ããã€ãã®ã¢ã¯ã·ã§ã³ã«å解ã§ããŸãã
+ configã§2ã€ã®ãã©ã¡ãŒã¿ãŒã«æ°ã¥ãã人ïŒdefaultTimeOutsForWebDriverWaitãlowTimeOutsForWebDriverWaitã ã ãããã圌ãã¯ããã§ãã ãªããªã ç§ã¯ã·ã³ã°ã«ãã³ã«Webãã©ã€ããŒå šäœãæã£ãŠããŸãããæ¯åæ°ããWebDriverWaitãäœæãããã¯ãããŸããã§ãããã1ã€ã®é«éãã©ã€ããŒãæã£ãŠããŸããããšã©ãŒã®å Žåã§ãæ瀺çãªåŸ æ©ïŒ-ããŠãããªãã¯åæããå¿ èŠããããŸããã¡ãã»ãŒãžãåºãŠããŠããªãããšã確èªããããã«1ååŸ ã£ãŠãã ããã ãŸããã©ã¡ãåŽã«åºå·ããªããã®ç¶æ³ã¯æŸèæãå¿ èŠã§ã-ç§ã¯ããããããšã«ããŸããã
ã±ãŒã¹ïŒãã£ããã£å ¥åã ãã®ç¬éãèªååããããšã¯ã§ããŸããã§ãããã€ãŸãããããŸã§ã®ãšããããããã®ã¯ã©ãã·ã¥ãã§ãã¯ã¯ã¯ã©ãã·ã¥ããŸããããã£ããã£ãã¹ããµãŒãã¹ãæžããŠãããŸããã§ããïŒãã ããèªèã®ããã«ãã¥ãŒã©ã«ãããã¯ãŒã¯ãäœæããæ¹ãç°¡åã§ãïŒïŒã ãã®å Žåãã³ã³ãããŒã«ã€ãã³ããäœæããŸãããã®ã€ãã³ãã§ã¯ãèŠçŽ ããªãããšã確èªããŸã-äžæ£ãªã³ã³ãããŒã«ã³ãŒãã«é¢ããéç¥ãhasExceptionBlockå±æ§ãèšå®ããŸãã 以åã¯ãããã€ãã®ç¹°ãè¿ãïŒ5ïŒãå®è¡ã§ããããã«ã¢ã¯ã·ã§ã³ãèŠæ±ããŸããããçµå±ãexceptionBlockãäœæããŸããã
ç§ã®æèããã®äŸã
ã€ãã³ãã®ç»é²æ¹æ³ã¯æ¬¡ã®ãšããã§ãã
<event type="checkElementsInVisibility" hasExceptionBlock="1"> <orderNumber>57</orderNumber> <fields> <field> <element>___</element> </field> </fields> </event>
ãããŠãããã§exceptionBlock after events
<exceptionBlock> <event type="clickElement"> <orderNumber>10</orderNumber> <elementName>_____</elementName> </event> </exceptionBlock>
ãããŠãã¯ãã1ããŒãžã®ã¢ã¯ã·ã§ã³ã¯ããã€ãã®ã¢ã¯ã·ã§ã³ã«å解ã§ããŸãã
+ configã§2ã€ã®ãã©ã¡ãŒã¿ãŒã«æ°ã¥ãã人ïŒdefaultTimeOutsForWebDriverWaitãlowTimeOutsForWebDriverWaitã ã ãããã圌ãã¯ããã§ãã ãªããªã ç§ã¯ã·ã³ã°ã«ãã³ã«Webãã©ã€ããŒå šäœãæã£ãŠããŸãããæ¯åæ°ããWebDriverWaitãäœæãããã¯ãããŸããã§ãããã1ã€ã®é«éãã©ã€ããŒãæã£ãŠããŸããããšã©ãŒã®å Žåã§ãæ瀺çãªåŸ æ©ïŒ-ããŠãããªãã¯åæããå¿ èŠããããŸããã¡ãã»ãŒãžãåºãŠããŠããªãããšã確èªããããã«1ååŸ ã£ãŠãã ããã ãŸããã©ã¡ãåŽã«åºå·ããªããã®ç¶æ³ã¯æŸèæãå¿ èŠã§ã-ç§ã¯ããããããšã«ããŸããã
ã€ãã³ãã®çš®é¡
ããã§ã¯ãã·ã¹ãã ã®ã»ãšãã©ãã¹ãŠããã¹ãã§ããã¹ã«ãŠãã»ãããªã©ãã€ãã³ãã®æå°éã®ã»ãããæäŸããŸãã
ãããŠãã€ãã³ããäœã§ãããã©ã®ããã«æ§ç¯ãããããç解ããã®ã¯ã³ãŒãã«ãšã£ãŠã¹ã ãŒãºã§ãã ã³ãŒãã¯åºæ¬çã«ãã¬ãŒã ã¯ãŒã¯ãå®è£ ããŸãã DataBaseWrapperãšSeleniumWrapperã®2ã€ã®ã¯ã©ã¹ããããŸãã ãããã®ã¯ã©ã¹ã¯ãã€ã³ãã©ã¹ãã©ã¯ãã£ã³ã³ããŒãã³ããšã®çžäºäœçšãèšè¿°ãããã©ãããã©ãŒã ã®æ©èœãåæ ããŸãã SeleniumWrapperãå®è£ ããã€ã³ã¿ãŒãã§ã€ã¹ãæäŸããŸã
package logic.selenium; import models.ElementWithStringValue; import models.webpackage.Element; import org.openqa.selenium.WebElement; public interface SeleniumService { void initialization(boolean webDriverWait); void nacigateTo(String url); void refreshPage(); boolean checkElementNotPresent(Element element); WebElement findSingleVisibleElement(Element element); WebElement findSingleElementInDOM(Element element); void enterSingleValuesToWebField(ElementWithStringValue element); void click(Element element); String getInputValue(Element element); Object jsReturnsValue(String jsFunction); //Actions actions void doubleClick(Element element); void moveMouseToElement(Element element); void pressKey(CharSequence charSequence); void getScreenShot(String storage); }
ã»ã¬ã³ã®ãã¹ãŠã®æ©èœã«ã€ããŠèª¬æãããã©ãããã©ãŒã ã®æ©èœããªãŒããŒã¬ã€ããŸããå®éãäž»ãªæ©èœã¯ãenterSingleValuesToWebFieldãã¡ãœããã§ãã WebPackageã§èŠçŽ ã®ã¿ã€ããæå®ããããšã«æ³šæããŠãã ããã ãããã£ãŠããã£ãŒã«ãã«å ¥åãããšãã«ãã®ã¿ã€ãã«ã©ã®ããã«åå¿ããããããã«èšè¿°ããŸãã 1åæžããŠå¿ããŸãã äžèšã®æ¹æ³ã¯ããŸãèªåã§ä¿®æ£ããå¿ èŠããããŸãã ããšãã°ãçŸåšæå¹ãªã¿ã€ã5ããã³6ã¯ãç§ã®ã·ã¹ãã ã«ã®ã¿é©ããŠããŸãã ãããŠãããªãããã£ã«ã¿ãŒã®ãããªãã®ãæã£ãŠããŠãããããã®ãã£ã«ã¿ãŒããããå¿ èŠãããããããå žåçã§ããå ŽåïŒããªãã®ãŠã§ãã¢ããªã±ãŒã·ã§ã³ã§ïŒãããã䜿çšããã«ã¯ãæåã«ãã£ãŒã«ãäžã«ããŠã¹ã移åããããã€ãã®ãã£ãŒã«ãã衚瀺ãããã®ãåŸ ã£ãŠãããã€ãã«åãæ¿ããåŸ ã£ãŠãã ããäœãããããããã«è¡ã£ãŠå ¥åããŠãã ãã...æããªã¢ã¯ã·ã§ã³ã®ã¡ã«ããºã ã1åæå®ããã¹ã€ããæ§é å ã§ããã«ãŠããŒã¯ãªã¿ã€ããäžããŠãã ãã-æ°ã«ããªãã§ãã ãã-ããªãã¯ãã¹ãŠã®åæ§ã®ã¢ããªã±ãŒã·ã§ã³ãã£ã«ã¿ãŒã®å€æ æ§ã¡ãœãããååŸããŸãã
ãã®ãããããã±ãŒãžãpackage logic.testcase.eventsãã«ã¯ãã€ãã³ãã®äžè¬çãªã¢ã¯ã·ã§ã³ãèšè¿°ããæœè±¡ã¯ã©ã¹ããããŸãã ç¬èªã®ã€ãã³ããäœæããã«ã¯ãæ°ããã¯ã©ã¹ãäœæãããã®æœè±¡ã¯ã©ã¹ããç¶æ¿ããå¿ èŠããããŸãããããã«ã¯æ¢ã«dataBaseServiceãšseleniumServiceããããŸãããããŠãå¿ èŠãªããŒã¿ãšãã®åŠçæ¹æ³ã決å®ããŸãã ãã®ãããªãã®ã ããã«å¿ããŠãæ°ããã€ãã³ããäœæããåŸãTestCaseActionFactoryãã¡ã¯ããªã¯ã©ã¹ãšãå¯èœã§ããã°XSDã¹ããŒã ãå®äºããå¿ èŠããããŸãã ããŠãæ°ããå±æ§ãè¿œå ãããå Žå-ã¢ãã«èªäœãå€æŽããŸãã å®éãéåžžã«ç°¡åã§é«éã§ãã
ã ãããã¹ã«ãŠããããã
goToURL-éåžžã¯æåã®ã¢ã¯ã·ã§ã³-æå®ããããªã³ã¯ãã¯ãªãã¯ããŸã
äŸïŒ
<event type="goToURL"> <orderNumber>10</orderNumber> <url>testURL</url> </event>
fillFields-æå®ãããèŠçŽ ãåãã
ç¹å¥ãªã¿ã°ïŒ
- ãã£ãŒã«ã -ãšã³ãã£ãã£ã³ã³ãããã£ãŒã«ã
- ãã£ãŒã«ã -èŠçŽ ã¿ã°ãå«ãŸããŠããŸã
- element -webPackageã®èŠçŽ ã®ååã瀺ããŸã
- value-瀺ãå€ããªãã·ã§ã³ã®typeå±æ§ãæã¡ãŸãïŒèŠçŽ ããã§ãã¯ããã¯ã¹ã®å Žåãå€ã®1ã€ã瀺ãããŸãïŒãcheckããŸãã¯ãuncheckãïŒ
- ãã£ãŒã«ã -èŠçŽ ã¿ã°ãå«ãŸããŠããŸã
- typeå±æ§-å€ãåãæ¹æ³ã瀺ããŸãããªãã·ã§ã³ãããã©ã«ãå€ã¯ã1ãã§ã
- 1-æå®ãããå€ãååŸãããŸã
- 2-ãã®å Žåãã\ TestSuite \ JSããã£ã¬ã¯ããªããæå®ãããJSé¢æ°ãå®è¡ãããŸãïŒ éèŠ-ã.txtããªãã§txtãã¡ã€ã«ã®ååã瀺ãããŠããŸãïŒãããŸã§ã®ãšãããjsé¢æ°ã®ã¢ããªã±ãŒã·ã§ã³ã¯ãã®åœ¢åŒã§ã®ã¿èŠã€ãã£ãŠããŸã-ã©ã³ãã ãªã€ã³ãçæããããã«äžç®æã§äœ¿çšããŠããŸãããå¯èœãªã¢ããªã±ãŒã·ã§ã³ã®ç¯å²ã¯åºãã§ãïŒ
- 3-ãã®å ŽåãããŒã¿ããŒã¹å ã®ã¯ãšãªã¯å€ãšããŠç€ºãããããã°ã©ã ã¯ãã®ã¯ãšãªã®æåã®çµæãæåã®çµæã«çœ®ãæããŸã
äŸïŒ
<event type="fillingFields"> <orderNumber>10</orderNumber> <fields> <field> <element>test</element> <value>test</value> </field> </fields> </event>
checkElementsVisibility-æå®ãããèŠçŽ ããã©ãŒã äžã«ååšããããšã確èªããŸãïŒã€ãŸããDOMã ãã§ãªãã衚瀺ãããŸãïŒã fieldå±æ§ã§ã¯ãWebPackageã®èŠçŽ ãŸãã¯çŽæ¥xpathã®ãããããæå®ã§ããŸã
äŸïŒ
<event type="checkElementsVisibility"> <orderNumber>10</orderNumber> <fields> <field> <element>test</element> </field> <field> <xpath>test</xpath> </field> </fields> </event>
checkElementsInVisibility - checkElementsVisibilityã«äŒŒãŠããŸãããéãåæ§ã§ãã
clickElement-æå®ãããèŠçŽ ãã¯ãªãã¯ããŸã
äŸïŒ
<event type="clickElement"> <orderNumber>10</orderNumber> <elementName>test</elementName> </event>
checkInputValues-å ¥åå€ã確èªããŸã
äŸïŒ
<event type="checkInputValues"> <orderNumber>10</orderNumber> <fields> <field> <element>test</element> <value>test</value> </field> </fields> </event>
dbUpdate-ããŒã¿ããŒã¹ã§æŽæ°ãå®è¡ããŸãïŒ oXygenã¯dbUpdateã¿ã€ãã®1ã€ã®ã€ãã³ãã«å¥åŠãªåå¿ãããŸã-ã©ãããã°ããã®ãããããŸããããçç±ãããããŸãã ïŒ
äŸïŒ
<event type="dbUpdate"> <orderNumber>10</orderNumber> <dbRequest>update - </dbRequest> </event>
CheckQueryResultWithUtilityValue-ããŒã¿ããŒã¹ããã®å€ã䜿çšããŠããŠãŒã¶ãŒãå ¥åããå€ã確èªããŸã
äŸïŒ
<event type="checkQueryResultWithUtilityValue"> <orderNumber>10</orderNumber> <dbRequest>select ...</dbRequest> <utilityValue>test</utilityValue> </event>
checkFieldsPresenceByQueryResult-ãã¿ãŒã³ããšã« xpathã§ãã©ãŒã äžã®èŠçŽ ã®ååšã確èªããŸãã ç®çã®ãã¿ãŒã³ãæå®ãããŠããªãå Žåãæ€çŽ¢ã¯ãã¿ãŒã³.//* [textïŒïŒ[containsïŒnormalize-spaceïŒãïŒã "$"ïŒ]]ã«åŸã£ãŠè¡ãããŸãã ç¬èªã®ãã¿ãŒã³ãèšè¿°ããå ŽåãããŒã¿ããŒã¹ããå€ãé 眮ããå Žæã«ã$ããæå®ããå¿ èŠããããŸãã ç§ã®ã·ã¹ãã ã«ã¯ããããã°ãªããããããããã«ã¯éåžžãããçš®ã®ãã¥ãŒãã圢æãããå€ããããŸãã ãã®ãããªã°ãªããããã¹ããããã®ã€ãã³ã
äŸïŒ
<event type="checkFieldsPresenceByQueryResult"> <orderNumber>10</orderNumber> <dbRequest>test</dbRequest> <utilityValue></utilityValue> </event>
åŸ æ© -ãã¹ãŠãåçŽã§ã-æå®ãããããªç§æ°åŸ æ©ããŸãã æ®å¿µãªãããããã¯æŸèæã§ãããšèããããŠããŸãããç§ã¯ç¢ºãã«èšãã§ããã-æã«ã¯ãããªãã§è¡ãããšã¯äžå¯èœã§ã
äŸïŒ
<event type="wait"> <orderNumber>10</orderNumber> <utilityValue>1000</utilityValue> </event>
scrollDown-æå®ãããèŠçŽ ããäžã«ã¹ã¯ããŒã«ããŸãã ããã¯æ¬¡ã®ããã«è¡ãããŸããæå®ãããèŠçŽ ãã¯ãªãã¯ãããPgDnãããŒãæŒããŸãã äžã«ã¹ã¯ããŒã«ããªããã°ãªããªãã£ãç§ã®å Žåãããã¯ããŸãæ©èœããŸãïŒ
äŸïŒ
<event type="scrollDown"> <orderNumber>10</orderNumber> <elementName>test</elementName> </event>
userInput-æå®ãããèŠçŽ ã«å€ãå ¥åããŸãã ç§ã®ãªãŒãã¡ãŒã·ã§ã³ã§å¯äžã®åèªåããã€ã¹ã§ããã£ããã£ã«ã®ã¿äœ¿çšãããŸãã å€ãå ¥åããèŠçŽ ã瀺ãããŠããŸãã å€ã¯ãããã¢ãããã€ã¢ãã°ããã¯ã¹ã«å ¥åãããŸãã
äŸïŒ
<event type="userInput"> <orderNumber>10</orderNumber> <elementName>capch_input</elementName> </event>
ã³ãŒãã«ã€ããŠ
ããã§ãããããããã®ã¯ãªãŒã³ã¢ãŒããã¯ãã£ã®ååã«åŸã£ãŠãã©ãããã©ãŒã ãäœæããããšããŸããã
ããã±ãŒãžïŒ
ã¢ããªã±ãŒã·ã§ã³-åæåãšèµ·å+æ§æãšã¬ããŒãïŒReportã¯ã©ã¹ã«ã€ããŠscãããªãã§ãã ãã-ãããæãç°¡åã«å®è¡ãããã§ããã ãæ©ãå®è¡ãããŸãïŒ
ããžãã¯-SeleniumãšDBã®äž»èŠãªããžãã¯+ãµãŒãã¹ã ã€ãã³ãããããŸãã
ã¢ãã«-XMLã®POJOããã³ãã¹ãŠã®ãã«ããŒãªããžã§ã¯ãã¯ã©ã¹
utils-ã»ã¬ã³ãšdbã®ã·ã³ã°ã«ãã³
ã³ãŒããå®è¡ããã«ã¯ãjdk 12ãããŠã³ããŒãããã©ãã§ãæå®ããŠãããããªã³ã«ãªãããã«ããå¿ èŠããããŸãã ã¢ã€ãã¢ã§ã¯ãããã¯ãããžã§ã¯ãæ§é ->ã¢ãžã¥ãŒã«ãšãããžã§ã¯ããä»ããŠè¡ãããŸãã ãŸããMavenã©ã³ããŒã«ã€ããŠãå¿ããªãã§ãã ããã ãããŠãbatãã¡ã€ã«ã§èµ·åãããšãã«ã-enable-previewãè¿œå ããŸããäŸããããŸããã
ããŠããã¹ãŠãèµ·åããã«ã¯ãJDKã§ojdbcãã©ã€ããŒãããŠã³ããŒãããdzharnikããSprintAutoTest \ src \ libããã£ã¬ã¯ããªã«ããããããå¿ èŠããããŸããç§ã¯ãããæäŸããŸããããªããªãçŸåšãããã®Oracleã§ã¯ãã¹ãŠãæ·±å»ã§ã-ããŠã³ããŒãããã«ã¯ç»é²ããå¿ èŠããããŸããã誰ããäœããã®æ¹æ³ã§å¯ŸåŠããã¯ãã§ãïŒãŸãããã¹ãŠã®ãã©ã«ããäœæãããŠããããšã確èªããŠãã ãããããã§ãªããã°ã¬ããŒãã¯ä¿åãããŸããïŒ
ãŸãšã
ãã®ããããã¹ãã©ã³ãã£ãŒãããããã¹ãã®äœæãéåžžã«é«éã§ãã 1é±éã®äœæ¥äžã«ãããããã«ãã£ãŠ5ã6åã§å®è¡ããã1.5æéã®æåäœæ¥ãèªååã§ããŸããããããã¯ãé£çµããããã¹ãã±ãŒã¹ã®çŽ3700è¡ãšèšè¿°ããã830èŠçŽ ïŒ4800è¡ä»¥äžïŒã§ããæ°å€ã¯å€§ãŸããªããã枬å®ãããŠããŸããããèªååã«åŸäºããŠãã人ã¯ããããç¹ã«ããããã«ããããã·ã¹ãã ã«ãšã£ãŠéåžžã«é«ãææšã§ããããšãç解ããå¿ èŠããããŸããåæã«ããã¹ãŠããã¹ãããŸã-ããžãã¹ããžãã¯ãæºããããå±æ§ã®æ£ç¢ºãã«ã€ããŠããã€ãã®åŠå®çãªãã¹ããå®è¡ããæ¹æ³ã«æ²¿ã£ãŠãããŒãã¹ãšããŠãç§ã¯æ ããŠããªããã¹ãŠã®Webãã©ãŒã ããã§ãã¯ãããã¹ãŠã®æ©èœããã³äž»èŠãªèŠçŽ ã説æããŸãããããã¯ç¬ç«ããŠå¿ èŠã§ãç§ã«ãšã£ãŠãã©ããïŒå°ããªäœè«-ç§ã¯äž»ã«ãã¹ããæžããšãã ãcloseValidationã䜿çšããŸããå®å®ããŠããããã±ãŒã¿ãŒã亀差ããŠããªãããšãæãããªå Žåããã¹ãŠã®ã¢ã¯ã·ã§ã³ã§ãã±ãŒã¿ãŒããªãã«ããŠãããã»ã¹ãé«éåããŸãïŒã
äžèŠãå€ãã®xmlè¡ãããããã«èŠããŸãããå®éã«ã¯åèªåã§çæãããçŽæ¥å ¥åããããã©ã¡ãŒã¿ãŒã§ã®ã¿ãšã©ãŒãçºçããŸãïŒå®éã«ã¯ã2ã€ã®ã¬ãã«ã®æ€èšŒããããŸã-æåã¯ã¹ããŒã ã®xmlã2çªç®ã¯TestCaseã®éå§æã«æå®ããããã©ãŒã ãšèŠçŽ ã®ååšã確èªããŸãïŒã
ãã€ãã¹-ãã¹ãã®æ確ãªå¢çã¯ãããŸããããã®ããããããã¯æ¬ èœããŠãããããã¯ãã¹ãã§ã¯ãªãåãªããã¯ãã©ã³ãã£ãŒã§ãããšéé£ããããšãã§ããŸããç§ã¯ããèšããŸãïŒ
ãã©ãããã©ãŒã ã§ã¯ããã¹ãã¯æŠå¿µçã«ããã€ãã®èŠ³ç¹ããããã€ãã®æœè±¡åã¬ãã«ã«åããããŸãïŒ
- + â « » + â ( â .. -)
- ( action â event c + )
- , , â -. , â . , . , â ,
- ããŒãžäžã®åã¢ã¯ã·ã§ã³ã¯åäœãã¹ãã§ãïŒåäžã®çµæãtrueãŸãã¯falseã§è¿ããŸãïŒ
ç§ã®ã¢ãããŒããäœããšæ¯èŒãããšãããšãã°äººæ°ã®ãããã¥ãŠãªãšBDDã®ã³ã³ã»ããã®ãã€ãã¹é¢ã¯ãç§ã«ãšã£ãŠããéèŠã§ãïŒæ£ç¢ºã«ç§ã®ã·ã¹ãã ã®ãããªãã®ããã¹ããããšãïŒïŒ
- äžå®å®ãªWebã¢ããªã±ãŒã·ã§ã³ããã¹ãããå Žåããã¹ãã®ããã©ãŒãã³ã¹ãä¿èšŒã§ããŸããã ã€ãŸã ç§ã®å Žåãã»ãšãã©ã®ãã¹ãã§å®è¡ãä¿èšŒããããšã¯ã§ããŸããããã¹ãã®ã»ããã§ãã¹ãã説æãããšãäžè¬ã«åãå ¥ããããªãããã€ãã«ãªããŸãã
- ããŠãè³ãæã§ããã°ã€ã³ã䌎ããã®ãã§ã«å·šå€§ãªäŸãäžããããŠããŸããã¯ãããã¹ãŠã®ç·Žç¿ã«ãããŠããšã©ãŒãçºçããããšã¯ãŸã£ãããããŸããïŒç¢ºãã«ã«ããŒãããã¹ãã§ãããããã¯ç¢ºãã§ãïŒããã®äŸã¯è¯ãã§ãããæ®ãã®ãã¹ãã§ã¯ãGivenãšWhenããç¡éã®æŸèæã圫ãå¿ èŠããããŸã-ç§ãå®éã®ãã¹ãã«äžããã·ã¹ãã ã§ã¯ãäžéæ¡ä»¶ã説æããã®ã«99ïŒ ããããŸããããã®ãã¹ãèªäœ-å€ãã®ãã©ãã«ãå°ãã®æ¬è³ªãããã«ã¯ã³ãŒãã«ç»ããŸãã
ç§ããããããšãèãããããšããããããç§ã®æã¯ãŸã å±ããŠããŸããïŒ
- 1åã®å®è¡ã§1ã€ã§ã¯ãªãè€æ°ã®ãã¹ããé£ç¶ããŠå®è¡ãã
- æ°ãããã¹ãã®äºå®ã«åºã¥ããŠå€ãçæã§ããããã«ãšã³ãã£ãã£ããã³ãããå®è¡äžã«ä¿åããããšæããŸã
- äžå åãããããŒãžã§ã³ç®¡çãè¡ããŸããgitã ãã§ãªããå®è¡ãããã¹ãã®ããŒãžã§ã³ã瀺ãããã«ããŸãããŸãã¯ãåã³ãã©ã®ããŒãžã§ã³ãé¢é£ããŠããããç解ããã¹ããŒãã¢ãžã¥ãŒã«ã瀺ããŸãã
- ç§ãèšã£ãããã«ãæ°ããå€ã§æ°ãããã¹ããéå§ããã«ã¯ã1æ¡ãå€æŽããèªååããŠãã¹ããŒãã¢ãžã¥ãŒã«ãäœæããå¿ èŠããããŸã
- ãã¹ãŠã®ãã±ãŒã¿ãŒã1ãæã«ä¿åãããŠããããšã¯ããŸãæ°ã«ããŸããããããã§ãè¯ãæ¹æ³ã§ã¯ããããŠãŒã¶ãŒãã¬ã³ããªãŒãªä¿åæ§é ãäœæããå¿ èŠããããŸãã
- ã»ã¬ã³ãµãŒããŒãšæãåºããŠããªããããããCIãããŒã ã·ãã£ãªã©ãžã®ãããªãé©å¿ã®å¯èœæ§ã«ã€ããŠèãã䟡å€ããããšæããŸãã
ãŸããããããã¹ãŠã§ããgithubãžã®åç §ïŒãœãŒã¹ã³ãŒããåå°ããŸãã
ç§ã¯å»ºèšçãªæ¹å€ãéåžžã«ããããæããŸãããã®ãããžã§ã¯ããæ¬åœã«åœ¹ç«ã€ããšãé¡ã£ãŠããŸãã