Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bobcat upgrade #268

Merged
merged 7 commits into from
Jul 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ All notable changes to AET will be documented in this file.
**List of changes that are finished but not yet released in any final version.**

- [PR-271](https://github.com/Cognifide/aet/pull/271) Added possibility to override name parameter from the aet client
- [PR-268](https://github.com/Cognifide/aet/pull/268) Bobcat upgrade to version 1.4.0

## Version 2.1.6

Expand Down
13 changes: 10 additions & 3 deletions integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<path>`
or in `.../config/common/webdriver.properties` file.


[Chromedriver]: https://sites.google.com/a/chromium.org/chromedriver/
49 changes: 7 additions & 42 deletions integration-tests/sanity-functional/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,14 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<runSuite>**/CucumberSuite.java</runSuite>
<configuration.paths>src/main/config</configuration.paths>
<runSuite>**/CucumberSuite.java,**/BobcatSuite.java</runSuite>
<bobcat.version>1.4.0</bobcat.version>

<bobcat.version>1.2.1</bobcat.version>
<!-- there were some errors while trying to use version 1.2.4, do NOT upgrade -->
<cucumber.version>1.2.3</cucumber.version>

<!-- we are using newer version here as Bobcat needs JAVA 1.8 -->
<source.java.version>1.8</source.java.version>
</properties>

<dependencyManagement>
<dependencies>
<!-- junit scope needs to be overwritten for steps definition -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>compile</scope>
</dependency>
<!-- functional-tests (bobcat and cucumber need compile scope) -->
<dependency>
<groupId>com.cognifide.qa.bb</groupId>
Expand All @@ -70,19 +58,9 @@
<version>${bobcat.version}</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-guice</artifactId>
<version>${cucumber.version}</version>
<groupId>com.cognifide.qa.bb</groupId>
<artifactId>bb-cumber</artifactId>
<version>${bobcat.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand All @@ -100,19 +78,9 @@
<groupId>com.cognifide.qa.bb</groupId>
<artifactId>bb-reports</artifactId>
</dependency>

<!-- cucumber -->
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-guice</artifactId>
<groupId>com.cognifide.qa.bb</groupId>
<artifactId>bb-cumber</artifactId>
</dependency>
</dependencies>

Expand Down Expand Up @@ -240,9 +208,6 @@
<execution>
<id>default-test</id>
<configuration>
<systemPropertyVariables>
<configuration.paths>${configuration.paths}</configuration.paths>
</systemPropertyVariables>
<includes>
<include>${runSuite}</include>
</includes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
proxy.enabled=false
proxy.ip=127.0.0.1
proxy.port=9000
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this path is required. Will this work on all instances?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right: this is an arbitrary value. If chromedriver is not found then there is a stacktrace with following error:

2) Error in custom provider, java.lang.IllegalStateException: The driver executable does not exist: D:\Selenium\chromedriver.exe

If this config value is commented then we have following error:

2) Error in custom provider, java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property;

What should we do here? Currently on master we have:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should at least document the necessary change on the path to the chromedriver in the comment on in the it-tests README ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have update the README


# +++ 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
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down