From f3eb9bb0c4c4f3be52ce65c4479a5a6dcda2968d Mon Sep 17 00:00:00 2001 From: Wiiitek Date: Fri, 29 Jun 2018 13:58:02 +0200 Subject: [PATCH 1/6] config files moved --- integration-tests/sanity-functional/pom.xml | 4 -- .../aet/sanity/functional/GuiceModule.java | 3 ++ .../config/common/proxy.properties} | 12 ++--- .../config/common}/report.properties | 4 +- .../config/common/webdriver.properties | 48 +++++++++++++++++++ .../config/dev}/instances.properties | 0 6 files changed, 56 insertions(+), 15 deletions(-) rename integration-tests/sanity-functional/src/main/{config/webdriver.properties => resources/config/common/proxy.properties} (65%) rename integration-tests/sanity-functional/src/main/{config => resources/config/common}/report.properties (89%) create mode 100644 integration-tests/sanity-functional/src/main/resources/config/common/webdriver.properties rename integration-tests/sanity-functional/src/main/{config => resources/config/dev}/instances.properties (100%) diff --git a/integration-tests/sanity-functional/pom.xml b/integration-tests/sanity-functional/pom.xml index 6229af328..c1e435d62 100644 --- a/integration-tests/sanity-functional/pom.xml +++ b/integration-tests/sanity-functional/pom.xml @@ -34,7 +34,6 @@ UTF-8 **/CucumberSuite.java - src/main/config 1.2.1 @@ -240,9 +239,6 @@ default-test - - ${configuration.paths} - ${runSuite} diff --git a/integration-tests/sanity-functional/src/main/java/com/cognifide/aet/sanity/functional/GuiceModule.java b/integration-tests/sanity-functional/src/main/java/com/cognifide/aet/sanity/functional/GuiceModule.java index 498139bfe..cc970280c 100644 --- a/integration-tests/sanity-functional/src/main/java/com/cognifide/aet/sanity/functional/GuiceModule.java +++ b/integration-tests/sanity-functional/src/main/java/com/cognifide/aet/sanity/functional/GuiceModule.java @@ -23,6 +23,9 @@ public class GuiceModule extends AbstractModule { @Override protected void configure() { + if (System.getProperty("configuration.paths") == null) { + System.setProperty("configuration.paths", "src/main/resources/config/dev;src/main/resources/config/common"); + } install(new CoreModule()); install(new ReporterModule()); } diff --git a/integration-tests/sanity-functional/src/main/config/webdriver.properties b/integration-tests/sanity-functional/src/main/resources/config/common/proxy.properties similarity index 65% rename from integration-tests/sanity-functional/src/main/config/webdriver.properties rename to integration-tests/sanity-functional/src/main/resources/config/common/proxy.properties index e65dcdc91..bd7f7a9e1 100644 --- a/integration-tests/sanity-functional/src/main/config/webdriver.properties +++ b/integration-tests/sanity-functional/src/main/resources/config/common/proxy.properties @@ -15,13 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -webdriver.defaultTimeout=10 -# +++ Chrome +++ -#webdriver.chrome.driver property should point to Chrome webdriver executable. -webdriver.type=chrome -webdriver.chrome.driver=D:/Selenium/chromedriver.exe - -# +++ Firefox +++ -#webdriver.type=firefox -#webdriver.firefox.bin=C:/Program Files (x86)/Mozilla Firefox 36/firefox.exe \ No newline at end of file +proxy.enabled=false +proxy.ip=127.0.0.1 +proxy.port=9000 diff --git a/integration-tests/sanity-functional/src/main/config/report.properties b/integration-tests/sanity-functional/src/main/resources/config/common/report.properties similarity index 89% rename from integration-tests/sanity-functional/src/main/config/report.properties rename to integration-tests/sanity-functional/src/main/resources/config/common/report.properties index 3a715975f..7a02b8bcb 100644 --- a/integration-tests/sanity-functional/src/main/config/report.properties +++ b/integration-tests/sanity-functional/src/main/resources/config/common/report.properties @@ -17,7 +17,7 @@ # # where to put reports and screenshots -bobcat.report.path=./target/bobcat-report-html +bobcat.report.path=./target/report # possible values: html, json, simple, stdout -bobcat.report.reporters=html +bobcat.report.reporters=html,json,simple,stdout diff --git a/integration-tests/sanity-functional/src/main/resources/config/common/webdriver.properties b/integration-tests/sanity-functional/src/main/resources/config/common/webdriver.properties new file mode 100644 index 000000000..507a876ff --- /dev/null +++ b/integration-tests/sanity-functional/src/main/resources/config/common/webdriver.properties @@ -0,0 +1,48 @@ +# +# AET +# +# Copyright (C) 2013 Cognifide Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +webdriver.defaultTimeout=10 +page.title.timeout=30 +thread.count=3 + + +# +++ Chrome +++ +#webdriver.chrome.driver property should point to Chrome webdriver executable. +webdriver.type=chrome +webdriver.chrome.driver=D:/Selenium/chromedriver.exe + +# +++ Firefox +++ +#webdriver.type=firefox +#webdriver.firefox.bin=C:/Program Files (x86)/Mozilla Firefox 36/firefox.exe + +# +++ Firefox +++ +#webdriver.type=firefox +#webdriver.gecko.driver=D:/Selenium/geckodriver.exe +# If you have special version for test you can uncomment and change next line +#webdriver.firefox.bin=c:/Program Files (x86)/Mozilla_Firefox_26/firefox.exe + +# +++ IE +++ +#webdriver.type=IE +#webdriver.ie.driver=E:/IEDriverServer.exe + +# +++ Ghost/Phantomjs +++ +#webdriver.type=ghost +#phantomjs.binary.path=E:/phantomjs-1.9.7-windows/phantomjs.exe + +# +++ HtmlUnit +++ +#webdriver.type=html diff --git a/integration-tests/sanity-functional/src/main/config/instances.properties b/integration-tests/sanity-functional/src/main/resources/config/dev/instances.properties similarity index 100% rename from integration-tests/sanity-functional/src/main/config/instances.properties rename to integration-tests/sanity-functional/src/main/resources/config/dev/instances.properties From f3dd34658b585bf283ae438ee35eab3ac1b061b3 Mon Sep 17 00:00:00 2001 From: Wiiitek Date: Fri, 29 Jun 2018 13:59:58 +0200 Subject: [PATCH 2/6] bobcat upgrade to version 1.4 --- integration-tests/sanity-functional/pom.xml | 6 +----- .../cognifide/aet/sanity/functional/suites/BobcatSuite.java | 6 +++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/integration-tests/sanity-functional/pom.xml b/integration-tests/sanity-functional/pom.xml index c1e435d62..33126727c 100644 --- a/integration-tests/sanity-functional/pom.xml +++ b/integration-tests/sanity-functional/pom.xml @@ -34,12 +34,8 @@ UTF-8 **/CucumberSuite.java + 1.4.0 - 1.2.1 - - 1.2.3 - - 1.8 diff --git a/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/suites/BobcatSuite.java b/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/suites/BobcatSuite.java index ca8d16d0b..5f93aeeaf 100644 --- a/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/suites/BobcatSuite.java +++ b/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/suites/BobcatSuite.java @@ -15,11 +15,15 @@ */ package com.cognifide.aet.sanity.functional.suites; +import com.cognifide.aet.sanity.functional.GuiceModule; import com.cognifide.aet.sanity.functional.HomePageTilesTest; +import com.cognifide.qa.bb.junit.Modules; +import com.cognifide.qa.bb.junit.concurrent.ConcurrentSuite; import org.junit.runner.RunWith; import org.junit.runners.Suite; -@RunWith(Suite.class) +@Modules(GuiceModule.class) +@RunWith(ConcurrentSuite.class) @Suite.SuiteClasses({HomePageTilesTest.class}) public class BobcatSuite { From 3f63a823fff852dd9e7290cf816510d9dd8e59be Mon Sep 17 00:00:00 2001 From: Wiiitek Date: Fri, 29 Jun 2018 14:00:19 +0200 Subject: [PATCH 3/6] dependencies clean-up --- integration-tests/sanity-functional/pom.xml | 37 +++------------------ 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/integration-tests/sanity-functional/pom.xml b/integration-tests/sanity-functional/pom.xml index 33126727c..567ec1f6e 100644 --- a/integration-tests/sanity-functional/pom.xml +++ b/integration-tests/sanity-functional/pom.xml @@ -41,13 +41,6 @@ - - - junit - junit - 4.11 - compile - com.cognifide.qa.bb @@ -65,19 +58,9 @@ ${bobcat.version} - info.cukes - cucumber-java - ${cucumber.version} - - - info.cukes - cucumber-junit - ${cucumber.version} - - - info.cukes - cucumber-guice - ${cucumber.version} + com.cognifide.qa.bb + bb-cumber + ${bobcat.version} @@ -95,19 +78,9 @@ com.cognifide.qa.bb bb-reports - - - - info.cukes - cucumber-java - - info.cukes - cucumber-junit - - - info.cukes - cucumber-guice + com.cognifide.qa.bb + bb-cumber From 98d7e708af27737269fd931f85df276466ec4ad1 Mon Sep 17 00:00:00 2001 From: Wiiitek Date: Fri, 29 Jun 2018 14:00:40 +0200 Subject: [PATCH 4/6] run also Bobcat JUnit test --- integration-tests/sanity-functional/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/sanity-functional/pom.xml b/integration-tests/sanity-functional/pom.xml index 567ec1f6e..579f01f5d 100644 --- a/integration-tests/sanity-functional/pom.xml +++ b/integration-tests/sanity-functional/pom.xml @@ -33,7 +33,7 @@ UTF-8 - **/CucumberSuite.java + **/CucumberSuite.java,**/BobcatSuite.java 1.4.0 1.8 From 6e1633329d006a232b9400aa28dfd010722b5132 Mon Sep 17 00:00:00 2001 From: Wiiitek Date: Fri, 29 Jun 2018 14:31:03 +0200 Subject: [PATCH 5/6] changelog update --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8879113ab..a4963a6b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to AET will be documented in this file. - [PR-260](https://github.com/Cognifide/aet/pull/260) Upgrade to Karaf 4.2.0 - [PR-261](https://github.com/Cognifide/aet/pull/261) AET artifacts folders watched for new files - [PR-265](https://github.com/Cognifide/aet/pull/265) Runner simplification refactor +- [PR-268](https://github.com/Cognifide/aet/pull/268) Bobcat upgrade to version 1.4.0 ## Version 2.1.5 From eedb0987d22b59cc79bac72c6d117b55eb42e797 Mon Sep 17 00:00:00 2001 From: Wiiitek Date: Mon, 2 Jul 2018 20:04:10 +0200 Subject: [PATCH 6/6] docs update --- integration-tests/README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/integration-tests/README.md b/integration-tests/README.md index e2afc4186..db1c98a1e 100644 --- a/integration-tests/README.md +++ b/integration-tests/README.md @@ -40,7 +40,14 @@ Bobcat tests for AET reports web application. Prerequisities: * AET instance running -* sample test suite: `test-suite` executed against `sample-site` site. -Report should be available at `report.url` -(please configured it in `src/main/config/instance.properties` file). +* Sample test suite: `test-suite` already executed against `sample-site` site. +Functional tests expect the report at URL specified by `report.url` property. +By default the URL is [http://aet-vagrant/report.html?company=aet&project=aet&suite=main](http://aet-vagrant/report.html?company=aet&project=aet&suite=main) +It may be changed it in `.../config/dev/instance.properties` file. +* Chrome browser installed +* Selenium [Chromedriver] available at *D:/Selenium/chromedriver.exe*. +This path can be changed at command-line with `-Dwebdriver.chrome.driver=` +or in `.../config/common/webdriver.properties` file. + +[Chromedriver]: https://sites.google.com/a/chromium.org/chromedriver/