ã¯ããã«
ããSelenium Auto Exec Serverãï¼ä»¥éãSelenium AESï¼ã¯ãSeleniumã«ããç¶ç¶çãªãªã°ã¬ãã·ã§ã³ãã¹ããè¡ããã¨ãç®çã¨ãããã¼ã«ã§ãã
ãæ¬è¨äºã§ã¯ãå®éã®ããã¸ã§ã¯ããæ³å®ããSelenium AESã使ã£ããªã°ã¬ãã·ã§ã³ãã¹ãã®éç¨æ¹æ³ã«ã¤ãã¦èª¬æãã¾ããSelenium AESã§æä¾ãããæ©è½ãªã©ã«ã¤ãã¦ã¯ãååã®è¨äºãSelenium AESå ¥éããåç §ãã¦ãã ããã
対象èªè
ãWebã¢ããªã±ã¼ã·ã§ã³ã®éçºè ã対象ã¨ãã¦ãã¾ãã
æ¬è¨äºã§èª¬æãããªã°ã¬ãã·ã§ã³ãã¹ãã®å 容
ãä¸è¨ã®ãããªéç¨ãæ³å®ããSelenium AESã®å°å ¥æ¹æ³ã説æãã¦ããã¾ãã
æ¯æ¥æ±ºããããæå»ã«Seleniumã«ãããã¹ããå®è¡
ãSeleniumã«ãããªã°ã¬ãã·ã§ã³ãã¹ãããæ¯æ¥æ±ºããããæå»ã«å®æ½ãã¾ããå®æçã«ã¢ããªã±ã¼ã·ã§ã³ã®æ£å¸¸æ§ã確èªãããã¨ã«ããããã°ã¬ãªã©ã®åé¡ã®æç¡ããããã«æ¤åºãããã¨ãã§ãã¾ãã
ãæ¬è¨äºã§ã¯ã対象ã¢ããªã±ã¼ã·ã§ã³ã®å®æçãªãã«ãæ¹æ³ã«ã¤ãã¦ã¯è§¦ãã¾ããããSelenium AESã§ãã¹ããå®è¡ããåã«ãCIï¼Continuous Integrationï¼ãã¼ã«ãªã©ã®ãææ°ã®ã½ã¼ã¹ã³ã¼ãã§ã¢ããªã±ã¼ã·ã§ã³ããã«ãããä»çµã¿ãå°å ¥ãã¦ããã¨è¯ãã¨æãã¾ãã
ãã¹ãçµæãã¡ã¼ã«ã§éç¥
ããã¹ãçµæãã¡ã¼ã«ã§éç¥ãããã¨ã«ããããã¡ãã¡Selenium AESã«ã¢ã¯ã»ã¹ããã¨ãããã¹ãçµæãåç §ãããã¨ãã§ãã¾ãã
ãã¹ãã±ã¼ã¹ãSubversionã§ç®¡ç
ãã½ã¼ã¹ã³ã¼ãã¨åæ§ã«ããã¹ãã±ã¼ã¹ããã¼ã¸ã§ã³ç®¡çã®å¯¾è±¡ã¨ãã¦ããï¼ã½ã¼ã¹ã³ã¼ãã¨åæãã¨ã£ã¦ããï¼ã®ãæã¾ããã¨èãã¾ãã
ãSelenium AESã§ã¯ãSubversionã®ãªãã¸ããªãããã¹ãã±ã¼ã¹ãåå¾ãããã¹ããå®è¡ãããã¨ãã§ãã¾ããããã«ããããã¹ãç¨ã®PCä¸ã«æåã§ãã¹ãã±ã¼ã¹ãé ç½®ãããããªãã¨ãããã«ã常ã«ææ°ã®ãã¹ãã±ã¼ã¹ã§ãã¹ããå®è¡ã§ãã¾ãã
ãä»ã®ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ãå©ç¨ãã¦ããå ´åã«ã¯ãè¨å®é ç®ã®ãbeforeCommandãï¼ãã¹ãå®è¡åã«å®è¡ããã³ãã³ããæå®ï¼ã§å¯¾å¿å¯è½ãªå ´åãããã¨æãã¾ãã®ã§ãã確èªãã ããã
Selenium AESã®ãã¦ã³ãã¼ã
ããã¹ããå®è¡ããPCä¸ã«ãSelenium AESããã¦ã³ãã¼ããã¾ããSelenium AESã¯ãå ¬å¼ãµã¤ããSelenium Auto Exec Serverï¼AESï¼ããããã¦ã³ãã¼ãã§ãã¾ããå·çæç¹ã®ææ°ãã¼ã¸ã§ã³ã¯0.5ã§ãã
ããã¦ã³ãã¼ããã¡ã¤ã«ï¼selenium-autoexec-server-0.5.zipï¼ã¯ãZIPå½¢å¼ã§å§ç¸®ããã¦ããã®ã§ããã¦ã³ãã¼ããã¦é©å½ãªãã£ã¬ã¯ããªã«è§£åãã¾ãã
Selenium AESã®è¨å®
ã解åãããã£ã¬ã¯ããªã«ãããsetting.propertiesããç·¨éããå種è¨å®ãè¡ãã¾ãã以éãå¿ è¦æä½éã®è¨å®ãè¨è¼ãã¾ãããä»ã«ãæ§ã ãªè¨å®ãããã¾ãã®ã§ãè¨å®ã§ããå 容ã«ã¤ãã¦ã¯ãä¸åº¦ç®ãéãã¦ãããã¨ãã奨ããã¾ãã
ãã¹ããå®è¡ãããã©ã¦ã¶ãè¨å®
ããbrowserãã«ãã¹ããå®è¡ãããã©ã¦ã¶ãè¨å®ãã¾ãã
browser=*firefoxproxy,*iexploreproxy
ãã¹ã対象ã®ãã¡ã¤ã³ãè¨å®
ããstartURLãã«ãã¹ã対象ã®ãã¡ã¤ã³ãæå®ãã¾ãã
startURL=http://example.com/
å®æçã«å®è¡ããæéãè¨å®
ããautoExecTimeãã«å®è¡ããæå»ãæå®ãã¾ãï¼hh:mmã§æåãæå®ï¼ã
autoExecTime=2:00
ãã¹ãã±ã¼ã¹ãåå¾ãããªãã¸ããªãè¨å®
ããsuiteRepoãã«ããã¹ãã±ã¼ã¹ã®åå¾å ã¨ãªãSubversionã®ãªãã¸ããªURLãæå®ãã¾ãã
suiteRepo=http://example.com/svnrepo/selenium-test/
ãSubversionã§èªè¨¼ãå¿ è¦ãªå ´åã«ã¯ããsuiteRepoUsernameãããsuiteRepoPasswordãã«ãã¦ã¼ã¶åã¨ãã¹ã¯ã¼ããæå®ãã¾ãã
# èªè¨¼ã¦ã¼ã¶å suiteRepoUsername=username # èªè¨¼ãã¹ã¯ã¼ã suiteRepoPassword=password
ãã¹ãã±ã¼ã¹ã®ç®¡çæ¹æ³
ãSeleniumã§ã¯ãè¤æ°ã®ãã¹ãã±ã¼ã¹ãã¾ã¨ãããã¹ãã¹ã¤ã¼ãåä½ã«ãã¹ããå®è¡ãã¾ãããã®ããããã¹ãã±ã¼ã¹ãå¢ããå ´åããã¹ãã¹ã¤ã¼ããå¤æ´ããå¿ è¦ããããçè ã¯ã¨ã¦ãé¢åã ã¨æãã¦ãã¾ãï¼ãã¹ãã¹ã¤ã¼ãã¸ã®è¿½å æ¼ããªã©ã®ãã¹ãçºçããããï¼ã
ããã®ãããªæéãçãããããSelenium AESã§ã¯ããã¹ãã¹ã¤ã¼ãã®èªåä½ææ©è½ãæä¾ãã¦ãã¾ããæå®ãã£ã¬ã¯ããªé ä¸ã«ã決ããããã«ã¼ã«ã§ãã¹ãã±ã¼ã¹ãé ç½®ãã¦ããã ãã§ãå®è¡æã«ãã¹ãã¹ã¤ã¼ããä½æããå®è¡ãã¦ããã¾ãã
ãä¸è¨ã®ãããªãã£ã¬ã¯ããªæ§æã®å ´åããã¹ãã±ã¼ã¹ã®ãã£ã¬ã¯ããªã¨ãã¦ãtestããæå®ããã¨ãé ä¸ã®ãã£ã¬ã¯ããªæ¯ã«ãã¹ãã¹ã¤ã¼ããä½æããå®è¡ãã¦ããã¾ãï¼Regist.htmlãUpdate.htmlãDelete.htmlã¨ãã£ã3ã¤ã®ãã¹ãã¹ã¤ã¼ããä½æãããï¼ã
test +- Regist/ … æ©è½æ¯ã«ãã£ã¬ã¯ããªãä½æ | +- Case1.html … ãã£ã¬ã¯ããªé ä¸ã«ãã¹ãã±ã¼ã¹ãé ç½® | +- Case2.html +- Update/ | +- Case1.html | +- Case2.html | +- Case3.html +- Delete/ +- Case1.html +- Case2.html +- Case3.html
ã詳ããã¯ãå ¬å¼ãµã¤ãã®è¨å®ãã¡ã¤ã«ã«é¢ããè¨è¿°ã®ãsuiteDirãã®é¨åããåç §ãã ããã
ã¡ã¼ã«éä¿¡ã®è¨å®
ããmail.hostããmail.portãã«ã¡ã¼ã«ãµã¼ãåã¨ãã¼ãçªå·ãæå®ãã¾ãã
# ãµã¼ãå mail.host=smtp.example.com # ãã¼ãçªå·ï¼25ã®å ´åã¯çç¥å¯ï¼ mail.port=925
ããmail.toããmail.fromãã«éä¿¡å /éä¿¡å ã¢ãã¬ã¹ãæå®ãã¾ãã
# éä¿¡å ã¢ãã¬ã¹ [email protected] # éä¿¡å ã¢ãã¬ã¹ [email protected]
ãèªè¨¼ããã®å ´åããmail.usernameãã¨ãmail.passwordããæå®ãã¾ãã
# èªè¨¼ã¦ã¼ã¶å mail.username=username # èªè¨¼ãã¹ã¯ã¼ã mail.password=password
ãSSLãå©ç¨ããï¼SMTP over SSLï¼å ´åããmail.sslãã«trueãæå®ãã¾ãã
mail.ssl=true
ãããã·ã®è¨å®ï¼å¿ è¦ãªå ´åï¼
ããã¹ã対象ã®ã¢ããªã±ã¼ã·ã§ã³ã«å¯¾ãã¦ããããã·ãçµç±ãã¦ã¢ã¯ã»ã¹ããå¿ è¦ãããå ´åããproxyHostããproxyPortããè¨å®ãã¾ãã
# ãããã·ã®ãã¹ãå proxyHost=proxy.example.com # ãããã·ã®ãã¼ãçªå· proxyPort=3122