diff --git a/phantomjsdriver.log b/phantomjsdriver.log new file mode 100644 index 0000000..0911753 --- /dev/null +++ b/phantomjsdriver.log @@ -0,0 +1,63 @@ +[INFO - 2014-11-25T16:41:32.574Z] GhostDriver - Main - running on port 8197 +[INFO - 2014-11-25T16:41:33.195Z] Session [ea087350-74c1-11e4-afe3-27c7cad584fe] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; PPC Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34","webSecurityEnabled":true} +[INFO - 2014-11-25T16:41:33.195Z] Session [ea087350-74c1-11e4-afe3-27c7cad584fe] - page.customHeaders: - {} +[INFO - 2014-11-25T16:41:33.195Z] Session [ea087350-74c1-11e4-afe3-27c7cad584fe] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"1.9.7","driverName":"ghostdriver","driverVersion":"1.1.0","platform":"mac-unknown-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}} +[INFO - 2014-11-25T16:41:33.195Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: ea087350-74c1-11e4-afe3-27c7cad584fe +[INFO - 2014-11-25T16:42:40.401Z] GhostDriver - Main - running on port 29080 +[INFO - 2014-11-25T16:42:41.006Z] Session [12740bb0-74c2-11e4-ad10-139f7d274b42] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; PPC Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34","webSecurityEnabled":true} +[INFO - 2014-11-25T16:42:41.007Z] Session [12740bb0-74c2-11e4-ad10-139f7d274b42] - page.customHeaders: - {} +[INFO - 2014-11-25T16:42:41.007Z] Session [12740bb0-74c2-11e4-ad10-139f7d274b42] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"1.9.7","driverName":"ghostdriver","driverVersion":"1.1.0","platform":"mac-unknown-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}} +[INFO - 2014-11-25T16:42:41.007Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 12740bb0-74c2-11e4-ad10-139f7d274b42 +[INFO - 2014-11-25T16:43:31.039Z] GhostDriver - Main - running on port 21109 +[INFO - 2014-11-25T16:43:31.619Z] Session [309ed2f0-74c2-11e4-8d6b-519401e221ef] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; PPC Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34","webSecurityEnabled":true} +[INFO - 2014-11-25T16:43:31.619Z] Session [309ed2f0-74c2-11e4-8d6b-519401e221ef] - page.customHeaders: - {} +[INFO - 2014-11-25T16:43:31.620Z] Session [309ed2f0-74c2-11e4-8d6b-519401e221ef] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"1.9.7","driverName":"ghostdriver","driverVersion":"1.1.0","platform":"mac-unknown-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}} +[INFO - 2014-11-25T16:43:31.620Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 309ed2f0-74c2-11e4-8d6b-519401e221ef +[INFO - 2014-11-25T16:44:06.512Z] GhostDriver - Main - running on port 22999 +[INFO - 2014-11-25T16:44:07.063Z] Session [45bf4d40-74c2-11e4-86bd-3b0c65fc48f2] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; PPC Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34","webSecurityEnabled":true} +[INFO - 2014-11-25T16:44:07.063Z] Session [45bf4d40-74c2-11e4-86bd-3b0c65fc48f2] - page.customHeaders: - {} +[INFO - 2014-11-25T16:44:07.063Z] Session [45bf4d40-74c2-11e4-86bd-3b0c65fc48f2] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"1.9.7","driverName":"ghostdriver","driverVersion":"1.1.0","platform":"mac-unknown-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}} +[INFO - 2014-11-25T16:44:07.064Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 45bf4d40-74c2-11e4-86bd-3b0c65fc48f2 +[INFO - 2014-11-25T16:46:32.571Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW +[INFO - 2014-11-25T16:47:40.400Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW +[INFO - 2014-11-25T16:48:31.040Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW +[INFO - 2014-11-25T16:49:06.513Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW +[INFO - 2014-11-25T16:51:32.571Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW +[INFO - 2014-11-25T16:52:40.400Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW +[INFO - 2014-11-25T16:53:31.040Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW +[INFO - 2014-11-25T16:54:06.514Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW +[INFO - 2014-11-25T16:55:52.670Z] GhostDriver - Main - running on port 40137 +[INFO - 2014-11-25T16:55:53.189Z] Session [eaa19420-74c3-11e4-8fb5-7f676f255fa1] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; PPC Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34","webSecurityEnabled":true} +[INFO - 2014-11-25T16:55:53.189Z] Session [eaa19420-74c3-11e4-8fb5-7f676f255fa1] - page.customHeaders: - {} +[INFO - 2014-11-25T16:55:53.189Z] Session [eaa19420-74c3-11e4-8fb5-7f676f255fa1] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"1.9.7","driverName":"ghostdriver","driverVersion":"1.1.0","platform":"mac-unknown-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}} +[INFO - 2014-11-25T16:55:53.189Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: eaa19420-74c3-11e4-8fb5-7f676f255fa1 +[INFO - 2014-11-25T16:55:53.246Z] ShutdownReqHand - _handle - About to shutdown +[INFO - 2014-11-25T16:56:32.572Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW +[INFO - 2014-11-25T16:57:04.812Z] GhostDriver - Main - running on port 38956 +[INFO - 2014-11-25T16:57:05.321Z] Session [15a00c60-74c4-11e4-89cb-0bd6fd273020] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; PPC Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34","webSecurityEnabled":true} +[INFO - 2014-11-25T16:57:05.321Z] Session [15a00c60-74c4-11e4-89cb-0bd6fd273020] - page.customHeaders: - {} +[INFO - 2014-11-25T16:57:05.321Z] Session [15a00c60-74c4-11e4-89cb-0bd6fd273020] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"1.9.7","driverName":"ghostdriver","driverVersion":"1.1.0","platform":"mac-unknown-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}} +[INFO - 2014-11-25T16:57:05.321Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 15a00c60-74c4-11e4-89cb-0bd6fd273020 +[INFO - 2014-11-25T16:57:05.373Z] ShutdownReqHand - _handle - About to shutdown +[INFO - 2014-11-25T16:57:40.400Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW +[INFO - 2014-11-25T16:57:49.616Z] GhostDriver - Main - running on port 16014 +[INFO - 2014-11-25T16:57:49.992Z] Session [303fff30-74c4-11e4-9e31-5bc560ae157b] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; PPC Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34","webSecurityEnabled":true} +[INFO - 2014-11-25T16:57:49.992Z] Session [303fff30-74c4-11e4-9e31-5bc560ae157b] - page.customHeaders: - {} +[INFO - 2014-11-25T16:57:49.999Z] Session [303fff30-74c4-11e4-9e31-5bc560ae157b] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"1.9.7","driverName":"ghostdriver","driverVersion":"1.1.0","platform":"mac-unknown-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}} +[INFO - 2014-11-25T16:57:50.010Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 303fff30-74c4-11e4-9e31-5bc560ae157b +[INFO - 2014-11-25T16:57:50.060Z] ShutdownReqHand - _handle - About to shutdown +[INFO - 2014-11-25T16:58:31.040Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW +[INFO - 2014-11-25T16:59:06.515Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW +[INFO - 2014-11-25T17:00:32.769Z] GhostDriver - Main - running on port 25081 +[INFO - 2014-11-25T17:00:33.308Z] Session [91985890-74c4-11e4-a209-4520a42fd3b3] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; PPC Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34","webSecurityEnabled":true} +[INFO - 2014-11-25T17:00:33.308Z] Session [91985890-74c4-11e4-a209-4520a42fd3b3] - page.customHeaders: - {} +[INFO - 2014-11-25T17:00:33.309Z] Session [91985890-74c4-11e4-a209-4520a42fd3b3] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"1.9.7","driverName":"ghostdriver","driverVersion":"1.1.0","platform":"mac-unknown-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}} +[INFO - 2014-11-25T17:00:33.309Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 91985890-74c4-11e4-a209-4520a42fd3b3 +[INFO - 2014-11-25T17:00:33.364Z] ShutdownReqHand - _handle - About to shutdown +[INFO - 2014-11-25T17:01:09.380Z] GhostDriver - Main - running on port 41527 +[INFO - 2014-11-25T17:01:09.942Z] Session [a76e1920-74c4-11e4-850b-61d8ee94d550] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; PPC Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34","webSecurityEnabled":true} +[INFO - 2014-11-25T17:01:09.942Z] Session [a76e1920-74c4-11e4-850b-61d8ee94d550] - page.customHeaders: - {} +[INFO - 2014-11-25T17:01:09.943Z] Session [a76e1920-74c4-11e4-850b-61d8ee94d550] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"1.9.7","driverName":"ghostdriver","driverVersion":"1.1.0","platform":"mac-unknown-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}} +[INFO - 2014-11-25T17:01:09.943Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: a76e1920-74c4-11e4-850b-61d8ee94d550 +[INFO - 2014-11-25T17:01:10.452Z] ShutdownReqHand - _handle - About to shutdown +[INFO - 2014-11-25T17:01:32.573Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW diff --git a/pom.xml b/pom.xml index 5927fa4..21d6dd4 100644 --- a/pom.xml +++ b/pom.xml @@ -16,9 +16,11 @@ 2.13 1.7.7 + localhost 9998 test + @@ -75,6 +77,12 @@ 4.11 test + + com.github.detro.ghostdriver + phantomjsdriver + 1.1.0 + test + com.github.stefanbirkner system-rules @@ -136,28 +144,90 @@ - org.eclipse.jetty - jetty-maven-plugin - 9.1.3.v20140225 + org.apache.maven.plugins + maven-surefire-plugin + 2.16 - 0 + + **/*WebTest.java + + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.17 + + + **/*WebTest.java + - environment - prod + webdriver.baseurl + http://${jetty.host}:${jetty.port} + + + + org.apache.maven.surefire + surefire-junit47 + 2.18 + + + + + integration-test + + integration-test + + + + verify + + verify + + + + + + org.eclipse.jetty + jetty-maven-plugin + 9.1.3.v20140225 + + 0 / - 9847 tms-local - - -Xmx1024m - -XX:MaxPermSize=512m - - run-forked + 9847 + + + start-jetty + pre-integration-test + + start + + + + + environment + test + + + 0 + true + + + + stop-jetty + post-integration-test + + stop + + + diff --git a/src/main/java/ru/qatools/school/switter/service/DatabaseProvider.java b/src/main/java/ru/qatools/school/switter/service/DatabaseProvider.java index 6d13db8..41f7824 100644 --- a/src/main/java/ru/qatools/school/switter/service/DatabaseProvider.java +++ b/src/main/java/ru/qatools/school/switter/service/DatabaseProvider.java @@ -26,7 +26,7 @@ public class DatabaseProvider implements ContainerRequestFilter { static { try { ServerConfig config = ServerConfig.newInstance(); - dbUrl = format("jdbc:h2:%s/%s,user=%s", config.getDbLocation(), config.getDbName(), DBUSER); + dbUrl = format("jdbc:h2:%s:%s,user=%s", config.getDbLocation(), config.getDbName(), DBUSER); logger.info(format("Starting embedded database with url '%s' ...", dbUrl)); openConnection(); Flyway flyway = new Flyway(); diff --git a/src/main/webapp/index.ftl b/src/main/webapp/index.ftl index 1a37e43..8f106f8 100644 --- a/src/main/webapp/index.ftl +++ b/src/main/webapp/index.ftl @@ -1,6 +1,6 @@ <#-- @ftlvariable name="model" type="ru.qatools.school.switter.models.Post[]" --> <#import "/layouts/main.ftl" as layout /> -<@layout.layout title="Blog: posts"> +<@layout.layout title="Switter">