Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 032e7fc

Browse files
committed
Improved test stability. Changed Tomcat port to avoid port clashes with previous tests on multi project Maven build.
1 parent e204c67 commit 032e7fc

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

‎chapter7/web-ui-example/pom.xml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@
165165
</goals>
166166
<phase>pre-integration-test</phase>
167167
<configuration>
168+
<port>8081</port>
168169
<fork>true</fork>
169170
</configuration>
170171
</execution>

‎chapter7/web-ui-example/src/test/groovy/com/manning/spock/AddProductGebSpec.groovy‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class AddProductGebSpec extends GebSpec {
1717
def "Navigation to page"() {
1818
when: "I go to the new product page"
1919
Browser.drive {
20-
go "http://localhost:8080/web-ui-example/add-product.html"
20+
go "/web-ui-example/add-product.html"
2121
}
2222

2323
then: "the form should load"

‎chapter7/web-ui-example/src/test/groovy/com/manning/spock/HomePageSpec.groovy‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class HomePageSpec extends GebSpec {
1515
def "Trivial Geb test for homepage"() {
1616
when: "I go to homepage"
1717
Browser.drive {
18-
go "http://localhost:8080/web-ui-example/index.html"
18+
go "/web-ui-example/index.html"
1919
}
2020

2121
then: "First page should load"
@@ -27,7 +27,7 @@ class HomePageSpec extends GebSpec {
2727
def "Trivial Geb test for homepage -header check"() {
2828
when: "I go to homepage"
2929
Browser.drive {
30-
go "http://localhost:8080/web-ui-example/index.html"
30+
go "/web-ui-example/index.html"
3131
}
3232

3333
then: "First page should load"

‎chapter7/web-ui-example/src/test/resources/GebConfig.groovy‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ import org.openqa.selenium.firefox.FirefoxDriver
88

99
driver = { new FirefoxDriver() }
1010

11-
baseUrl = "http://localhost:8080"
11+
baseUrl = "http://localhost:8081"
1212
reportsDir = "target/geb-reports"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /