Skip to content

Commit

Permalink
Merge branch 'version-1.1-dev' into fix-demo
Browse files Browse the repository at this point in the history
Conflicts:
	serenity-demo/src/main/java/net/serenity_bdd/demo/pages/GoogleHomePage.java
	serenity-demo/src/main/java/net/serenity_bdd/demo/pages/GoogleResultsPage.java
	serenity-demo/src/main/java/net/serenity_bdd/demo/steps/GoogleSearchSteps.java
	serenity-demo/src/test/java/net/serenity_bdd/demo/SearchingOnGoogleStory.java
  • Loading branch information
verhagen committed Oct 7, 2015
2 parents 7b58b52 + 6148fe2 commit 4b3733c
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 5 deletions.
40 changes: 40 additions & 0 deletions serenity-demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Serenity Demo


__WARNING:__ Works with Serenity v0.8.31, Selenium v2.23.1


## Execute the Demo


### Run Serenity with Maven, using FireFox

mvn verify

Does not run on Mac OS-X v10.10.5 with FireFox v41.0.1
Probably the `serenity-firefox-driver v2.23.1` is to old.


### Run Serenity with Maven, using Chrome

__WARNING:__ Before running the Maven command below, make sure the property `webdriver.chrome.driver` has the
correct value. Open the `pom.xml` and search for the profile _chrome_. Correct the path for _webdriver.chrome.driver_.

mvn -Pchrome verify

Runs on Mac OS-X v10.10.5 with Chrome v45.0.2454.93 (64-bit)


## Using Maven settings, for system specific properties

The Chrome Web-Driver path can be set in the Maven `pom.xml`. But it can also be added in the `settings.xml`. This
makes it easier, as no system / user specific settings are needed in the project configuration (`pom.xml`).

Add the following lines to the `settings.xml`, in the section for `profiles`.

<profile>
<id>chrome</id>
<properties>
<webdriver.chrome.driver>/Users/tjeerd/applications-dev/chromedriver</webdriver.chrome.driver>
</properties>
</profile>
40 changes: 37 additions & 3 deletions serenity-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>net.thucydides</groupId>
<artifactId>thucydides-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.8.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>thucydides-demo</name>
Expand All @@ -24,13 +24,21 @@
<dependency>
<groupId>net.thucydides</groupId>
<artifactId>thucydides-junit</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.8.31</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.thucydides</groupId>
<artifactId>thucydides-core</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.8.31</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand All @@ -48,6 +56,10 @@
<excludes>
<exclude>**/Abstract*.java</exclude>
</excludes>
<systemProperties>
<webdriver.driver>${webdriver.driver}</webdriver.driver>
<webdriver.chrome.driver>${webdriver.chrome.driver}</webdriver.chrome.driver>
</systemProperties>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -80,4 +92,26 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>firefox</id>
<properties>
<webdriver.driver>firefox</webdriver.driver>
</properties>
</profile>
<profile>
<id>chrome</id>
<properties>
<webdriver.driver>chrome</webdriver.driver>
<!-- Add the property 'webdriver.chrome.driver' as shown below to this profile. -->
<!-- Correct the value, so it contains the path to the location where the chromedriver -->
<!-- is installed. Or add this property key and related value to the 'settings.xml'. -->
<!-- See also the README.md -->
<!--
<webdriver.chrome.driver>/path-to/chromedriver</webdriver.chrome.driver>
-->
</properties>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package net.serenitybdd.demo;

import net.serenitybdd.demo.steps.GoogleSearchSteps;
import net.serenitybdd.junit.runners.SerenityRunner;
import net.thucydides.junit.runners.ThucydidesRunner;
import net.thucydides.core.annotations.Managed;
import net.thucydides.core.annotations.ManagedPages;
import net.thucydides.core.annotations.Steps;
Expand All @@ -11,7 +11,7 @@
import org.junit.runner.RunWith;
import org.openqa.selenium.WebDriver;

@RunWith(SerenityRunner.class)
@RunWith(ThucydidesRunner.class)
public class SearchingOnGoogleStory {

@Managed
Expand Down

0 comments on commit 4b3733c

Please sign in to comment.