{"id":381,"date":"2012-08-23T05:10:00","date_gmt":"2012-08-22T20:10:00","guid":{"rendered":"http:\/\/appsweets.net\/blog\/?p=381"},"modified":"2012-08-23T05:10:00","modified_gmt":"2012-08-22T20:10:00","slug":"brushing-up-the-tests-2","status":"publish","type":"post","link":"https:\/\/appsweets.net\/blog\/2012\/08\/23\/brushing-up-the-tests-2\/","title":{"rendered":"brushing up the tests #2"},"content":{"rendered":"<div class=\"db9cc8cdb64025d13c1cc9dad0a0e262\" data-index=\"1\" style=\"float: left; margin: 16px 16px 16px 0;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5825700137064158\";\r\n\/* 250sq, appsweets-blog *\/\r\ngoogle_ad_slot = \"4837931762\";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>\u3068\u308a\u3042\u3048\u305a\u5358\u306b Firefox \u3092\u8d77\u52d5\u3055\u305b\u308b\u3053\u3068\u306f\u3067\u304d\u305f\u306e\u3067\u3001\u6b21\u306b Opera \u3092\u8d77\u52d5\u3055\u305b\u3066\u307f\u308b\u3002<\/p>\n<p>\u307e\u305a classpath \u306b OperaDriver \u3092\u8ffd\u52a0\u3059\u308b:<br \/>\n<code lang=\"xml\">\n<path id=\"classpath.test\">\n\t<!-- operadriver -->\n\t<pathelement location=\"wasavi\/wd-tests\/libs\/operadriver-v0.17\/operadriver-v0.17.jar\" \/>\n<\/path>\n<\/code><\/p>\n<p>\u30c6\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3067 OperaDriver \u3092\u53c2\u7167\u3059\u308b\u305f\u3081\u306b import \u3092\u8ffd\u52a0\u3059\u308b:<br \/>\n<code lang=\"java\"><br \/>\nimport com.opera.core.systems.OperaDriver;<br \/>\n<\/code><\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3053\u308c\u3060\u3051\u3067\u3044\u3044\u306f\u305a\u2026\u2026\u3068\u8d77\u52d5\u3057\u3066\u307f\u305f\u3089\u3001Opera \u304c\u8d77\u52d5\u3057\u306a\u3044\u3002<a href=\"http:\/\/code.google.com\/p\/selenium\/wiki\/OperaDriver\" target=\"_blank\">wiki<\/a> \u3092\u898b\u308b\u3068\u73fe\u5728\u306e OperaDriver \u306f\u3001opera.exe \u306e\u5834\u6240\u3092\u5272\u3068\u6c7a\u3081\u3046\u3061\u306e\u5834\u6240\u304b\u3089\u3057\u304b\u63a2\u3055\u306a\u3044\u3088\u3046\u3060\u3002\u3046\u3061\u306e Opera \u306f C:\\Program Files\\Opera\\current\\opera.exe \u306b\u3044\u308b\u306e\u3067\u3042\u3063\u305f\u3002<\/p>\n<p>\u3053\u308c\u306f\u524d\u8ff0\u306e wiki \u306b\u66f8\u3044\u3066\u3042\u308b\u3068\u304a\u308a\u3001DesiredCapabilities \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u8a2d\u5b9a\u3092\u7a81\u3063\u8fbc\u3081\u3070\u4e0a\u66f8\u304d\u3067\u304d\u308b\u306e\u3067\u3001\u305d\u3046\u3057\u305f\u3002\u3053\u308c\u3067\u3068\u308a\u3042\u3048\u305a Opera \u81ea\u4f53\u306f\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u304c\u3001\u81ea\u52d5\u7684\u306b\u30ea\u30e2\u30fc\u30c8\u30c7\u30d0\u30c3\u30ac\u304c\u958b\u3044\u3066\u4f55\u304b\u3092\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u3067\u63a5\u7d9a\u3067\u304d\u306a\u3044\u4e91\u3005\u3068\u3044\u3046\u30a8\u30e9\u30fc\u3092\u5410\u3044\u3066\u7d42\u4e86\u3057\u3066\u3057\u307e\u3046\u3002\u3069\u3046\u3044\u3046\u3053\u3068\u306a\u306e\u3002<\/p>\n<p>\u3053\u3053\u306f\u3069\u3046\u3082\u52d8\u9055\u3044\u3057\u3066\u3044\u305f\u3088\u3046\u3060\u3002\u5148\u306e\u8a18\u4e8b\u3067 Selenium Server \u306f\u4eca\u56de\u306f\u3044\u3089\u306a\u3044\u3068\u66f8\u3044\u305f\u304c\u3001\u5fc5\u8981\u306e\u3088\u3046\u3060\u3002Firefox \u3067\u8a66\u3057\u305f\u3089\u666e\u901a\u306b\u8d77\u52d5\u3057\u305f\u306e\u3067\u60d1\u308f\u3055\u308c\u305f\u3002selenium-server-standalone-2.25.0.jar \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u3042\u3089\u304b\u3058\u3081<br \/>\n<code><br \/>\n$ java -jar selenium-server-standalone-2.25.0.jar<br \/>\n<\/code><br \/>\n\u306a\u3069\u3068\u3057\u3066\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3055\u305b\u3066\u304a\u304f\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002\u305f\u3060\u3001\u305b\u3063\u304b\u304f ant \u3067\u4e00\u672c\u5316\u3057\u3066\u3044\u308b\u306e\u3060\u304b\u3089\u30b5\u30fc\u30d0\u306e\u8d77\u52d5\u3068\u7d42\u4e86\u3082\u81ea\u52d5\u7684\u306b\u884c\u308f\u305b\u305f\u3044\u3002\u305d\u3053\u3067<br \/>\n<a href=\"http:\/\/wiki.openqa.org\/display\/SRC\/Selenium-RC+and+Continuous+Integration\" target=\"_blank\">http:\/\/wiki.openqa.org\/display\/SRC\/Selenium-RC+and+Continuous+Integration<\/a><br \/>\n\u3092\u53c2\u8003\u306b build.xml \u306b\u3044\u308d\u3044\u308d\u8ffd\u52a0\u3057\u305f\u3002\u3053\u308c\u3067 Opera \u3082\u8d77\u52d5\u3057\u305f\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067 Opera \u3067\u306e\u30c6\u30b9\u30c8\u6e96\u5099\u3082\u6574\u3063\u305f\u3002\u6b21\u306f Chrome \u3067\u3001ChromeDriver \u306f<br \/>\n<a href=\"https:\/\/code.google.com\/p\/chromedriver\/downloads\/list\" target=\"_blank\">https:\/\/code.google.com\/p\/chromedriver\/downloads\/list<\/a><br \/>\n\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u308b\u308f\u3051\u306a\u306e\u3060\u304c\u3002zip \u304c\u63c3\u3063\u3066\u3044\u3066\u3068\u308a\u3042\u3048\u305a\u6700\u65b0\u306e\u6301\u3063\u3066\u304f\u308c\u3070\u305d\u308c\u306b jar \u304c\u5165\u3063\u3066\u308b\u306e\u304b\u306a\uff1f\u3000\u3068\u671f\u5f85\u3057\u305f\u3089\u306a\u3093\u3068 zip \u306e\u4e2d\u8eab\u306f chromedriver.exe \u30d5\u30a1\u30a4\u30eb 1 \u3064\u306a\u306e\u3067\u3042\u3063\u305f\u3002\u3046\u3093\u2026\u2026\uff01\uff1f\u3000\u4f55\u304b\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u306a\u306e\uff1f<\/p>\n<p>\u3068\u601d\u3044\u3064\u3064\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u7684\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u958b\u304d\u30b5\u30fc\u30d0\u7684\u52d5\u4f5c\u3092\u59cb\u3081\u305f\u3088\u3046\u306a\u30ed\u30b0\u304c\u51fa\u3066\u304d\u305f\u3002\u306f\u3042\u3001Chrome \u5834\u5408\u306f\u3053\u308c\u3092\u30b5\u30fc\u30d0\u3068\u3057\u3066\u4f7f\u3046\u306e\u306d\u3002Chrome \u306b\u307e\u3064\u308f\u308b\u30a8\u30c8\u30bb\u30c8\u30e9\u306f<br \/>\n<a href=\"http:\/\/code.google.com\/p\/selenium\/wiki\/ChromeDriver\" target=\"_blank\">http:\/\/code.google.com\/p\/selenium\/wiki\/ChromeDriver<\/a><br \/>\n\u306b\u307e\u3068\u307e\u3063\u3066\u3044\u308b\u304c\u3001\u305d\u308c\u306b\u3088\u308b\u3068 ChromeDriver \u306f\u5b50\u30d7\u30ed\u30bb\u30b9\u3067\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3059\u308b\u30e2\u30fc\u30c9\u3001\u3059\u3067\u306b\u8d77\u52d5\u3057\u3066\u3042\u308b\u30b5\u30fc\u30d0\u3068 http \u3067\u3084\u308a\u3068\u308a\u3059\u308b\u30e2\u30fc\u30c9\u3001\u305d\u3057\u3066 chrome \u5c02\u7528\u306e\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3055\u305b\u308b\u30e2\u30fc\u30c9\u3068 3 \u5f62\u614b\u306e\u4f7f\u3044\u65b9\u304c\u3042\u308b\u3088\u3046\u3060\u3002chromedriver.exe \u306f %PATH% \u304c\u901a\u3063\u3066\u3044\u308b\u5834\u6240\u306b\u7f6e\u304f\u304b\u3001webdriver.chrome.driver \u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u30d1\u30b9\u3092\u66f8\u3044\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a chromedriver.exe \u3092\u4f7f\u3046\u65b9\u6cd5\u3067\u884c\u3063\u3066\u307f\u308b\u3002<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u306a\u3093\u3068\u304b 3 \u30d6\u30e9\u30a6\u30b6\u3092\u8d77\u52d5\u3055\u305b\u308b\u3068\u3053\u308d\u306b\u306f\u9054\u3057\u305f\u3002build.xml \u306e\u8a72\u5f53\u90e8\u5206\u306f\u3053\u3046\u306a\u3063\u305f:<br \/>\n<code lang=\"xml\"><br \/>\n<!--\n\ttest with selenium\n\t================================================================================\n--><\/p>\n<path id=\"classpath.test\">\n\t<!-- junit -->\n\t<pathelement location=\"wasavi\/wd-tests\/libs\/junit\/junit-4.10.jar\" \/>\n<p>\t<!-- operadriver -->\n\t<pathelement location=\"wasavi\/wd-tests\/libs\/operadriver-v0.17\/operadriver-v0.17.jar\" \/>\n<p>\t<!-- selenium core -->\n\t<pathelement location=\"wasavi\/wd-tests\/libs\/selenium-2.25.0\/selenium-java-2.25.0.jar\" \/>\n<p>\t<!-- libs for which selenium depends --><br \/>\n\t<fileset dir=\"wasavi\/wd-tests\/libs\/selenium-2.25.0\/libs\"><br \/>\n\t\t<include name=\"*.jar\" \/><br \/>\n\t\t<exclude name=\"operadriver-*.jar\" \/><br \/>\n\t<\/fileset><\/p>\n<p>\t<!-- all tests -->\n\t<pathelement location=\"wasavi\/wd-tests\/dst\" \/>\n<\/path>\n<p><target name=\"runtest_start_server\"><br \/>\n\t<java jar=\"wasavi\/wd-tests\/libs\/selenium-server-standalone-2.25.0.jar\"\n\t\tfork=\"true\" spawn=\"true\"><br \/>\n\t<\/java><br \/>\n<\/target><\/p>\n<p><target name=\"runtest_stop_server\"><br \/>\n\t<get taskname=\"selenium-shutdown\"\n\t\tsrc=\"http:\/\/localhost:4444\/selenium-server\/driver\/?cmd=shutDownSeleniumServer\"\n\t\tdest=\"stop-server-result.txt\" ignoreerrors=\"true\" \/><br \/>\n\t<echo message=\"standalone-server stopped.\" \/><br \/>\n<\/target><\/p>\n<p><target name=\"runtest_compile\"><br \/>\n\t<javac srcdir=\"wasavi\/wd-tests\/src\" destdir=\"wasavi\/wd-tests\/dst\" includeantruntime=\"false\"><br \/>\n\t\t<classpath refid=\"classpath.test\"\/><br \/>\n\t<\/javac><br \/>\n<\/target><\/p>\n<p><target name=\"runtest_junit\" depends=\"runtest_compile\"><br \/>\n\t<junit haltonfailure=\"false\"><br \/>\n\t\t<classpath refid=\"classpath.test\" \/><br \/>\n\t\t<sysproperty\n\t\t\tkey=\"webdriver.chrome.driver\"\n\t\t\tvalue=\"wasavi\/wd-tests\/libs\/chromedriver.exe\" \/><br \/>\n\t\t<formatter type=\"brief\" usefile=\"false\" \/>\n\t\t<test name=\"WasaviTestSuite\" \/><br \/>\n\t<\/junit><br \/>\n<\/target><\/p>\n<p><target name=\"runtest\">\n\t<parallel>\n\t\t<antcall target=\"runtest_start_server\" \/><br \/>\n\t\t<sequential><br \/>\n\t\t\t<echo message=\"running standslone-server...\" \/><br \/>\n\t\t\t<waitfor maxwait=\"2\" maxwaitunit=\"minute\" checkevery=\"100\"><br \/>\n\t\t\t\t<http url=\"http:\/\/localhost:4444\/selenium-server\/driver\/?cmd=testComplete\" \/><br \/>\n\t\t\t<\/waitfor><br \/>\n\t\t\t<antcall target=\"runtest_junit\" \/><br \/>\n\t\t\t<antcall target=\"runtest_stop_server\" \/><br \/>\n\t\t<\/sequential>\n\t<\/parallel>\n<\/target><br \/>\n<\/code><br \/>\n\u3042\u3068\u306f\u30c6\u30b9\u30c8\u306e\u9aa8\u7d44\u307f\u306b\u6ce8\u529b\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u3002<\/p>\n<div class=\"db9cc8cdb64025d13c1cc9dad0a0e262\" data-index=\"1\" style=\"float: left; margin: 16px 16px 16px 0;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5825700137064158\";\r\n\/* 250sq, appsweets-blog *\/\r\ngoogle_ad_slot = \"4837931762\";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>\u3068\u308a\u3042\u3048\u305a\u5358\u306b Firefox \u3092\u8d77\u52d5\u3055\u305b\u308b\u3053\u3068\u306f\u3067\u304d\u305f\u306e\u3067\u3001\u6b21\u306b Opera \u3092\u8d77\u52d5\u3055\u305b\u3066\u307f\u308b\u3002 \u307e\u305a classpath \u306b OperaDriver \u3092\u8ffd\u52a0\u3059\u308b: \u30c6\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3067 OperaDriver \u3092\u53c2\u7167\u3059\u308b\u305f\u3081\u306b import \u3092\u8ffd\u52a0\u3059\u308b: import com.opera.core.systems.OperaDriver; \u3068\u308a\u3042\u3048\u305a\u3053\u308c\u3060\u3051\u3067\u3044\u3044\u306f\u305a\u2026\u2026\u3068\u8d77\u52d5\u3057\u3066\u307f\u305f\u3089\u3001Opera \u304c\u8d77\u52d5\u3057\u306a\u3044\u3002wiki \u3092\u898b\u308b\u3068\u73fe\u5728\u306e OperaDriver \u306f\u3001opera.exe \u306e\u5834\u6240\u3092\u5272\u3068\u6c7a\u3081\u3046\u3061\u306e\u5834\u6240\u304b\u3089\u3057\u304b\u63a2\u3055\u306a\u3044\u3088\u3046\u3060\u3002\u3046\u3061\u306e Opera \u306f C:\\Program Files\\Opera\\current\\opera.exe \u306b\u3044\u308b\u306e\u3067\u3042\u3063\u305f\u3002 \u3053\u308c\u306f\u524d\u8ff0\u306e wiki \u306b\u66f8\u3044\u3066\u3042\u308b\u3068\u304a\u308a\u3001DesiredCapabilities \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u8a2d\u5b9a\u3092\u7a81\u3063\u8fbc\u3081\u3070\u4e0a\u66f8\u304d\u3067\u304d\u308b\u306e\u3067\u3001\u305d\u3046\u3057\u305f\u3002\u3053\u308c\u3067\u3068\u308a\u3042\u3048\u305a Opera \u81ea\u4f53\u306f\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u304c\u3001\u81ea\u52d5\u7684\u306b\u30ea\u30e2\u30fc\u30c8\u30c7\u30d0\u30c3\u30ac\u304c\u958b\u3044\u3066\u4f55\u304b\u3092\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u3067\u63a5\u7d9a\u3067\u304d\u306a\u3044\u4e91\u3005\u3068\u3044\u3046\u30a8\u30e9\u30fc\u3092\u5410\u3044\u3066\u7d42\u4e86\u3057\u3066\u3057\u307e\u3046\u3002\u3069\u3046\u3044\u3046\u3053\u3068\u306a\u306e\u3002 \u3053\u3053\u306f\u3069\u3046\u3082\u52d8\u9055\u3044\u3057\u3066\u3044\u305f\u3088\u3046\u3060\u3002\u5148\u306e\u8a18\u4e8b\u3067 Selenium Server \u306f\u4eca\u56de\u306f\u3044\u3089\u306a\u3044\u3068\u66f8\u3044\u305f\u304c\u3001\u5fc5\u8981\u306e\u3088\u3046\u3060\u3002Firefox \u3067\u8a66\u3057\u305f\u3089\u666e\u901a\u306b\u8d77\u52d5\u3057\u305f\u306e\u3067\u60d1\u308f\u3055\u308c\u305f\u3002selenium-server-standalone-2.25.0.jar \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u3042\u3089\u304b\u3058\u3081 &hellip; <a href=\"https:\/\/appsweets.net\/blog\/2012\/08\/23\/brushing-up-the-tests-2\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[15,14,13,4],"class_list":["post-381","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-ant","tag-java","tag-selenium","tag-wasavi"],"_links":{"self":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/comments?post=381"}],"version-history":[{"count":5,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/381\/revisions"}],"predecessor-version":[{"id":386,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/381\/revisions\/386"}],"wp:attachment":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/media?parent=381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/categories?post=381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/tags?post=381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}