diff options
author | Denis Anisimov <denis@vaadin.com> | 2014-09-24 20:42:54 +0300 |
---|---|---|
committer | Sauli Tähkäpää <sauli@vaadin.com> | 2014-10-29 08:56:54 +0200 |
commit | dc9838d1f7c8e50db40086b0d716de605783462c (patch) | |
tree | f758f059338c296dacabb151ec41ebb7a7054ff2 | |
parent | 21d6298a8835e48ba47e941b5de6671bf829935c (diff) | |
download | vaadin-framework-dc9838d1f7c8e50db40086b0d716de605783462c.tar.gz vaadin-framework-dc9838d1f7c8e50db40086b0d716de605783462c.zip |
Use deployment url property value for base URL if it's defined (#14758).
Change-Id: I249e37cfaf23564b00136b33132df3d339a46e98
-rw-r--r-- | uitest/eclipse-run-selected-test.properties | 6 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/uitest/eclipse-run-selected-test.properties b/uitest/eclipse-run-selected-test.properties index 70010fd1da..f8fb0a8c14 100644 --- a/uitest/eclipse-run-selected-test.properties +++ b/uitest/eclipse-run-selected-test.properties @@ -14,6 +14,9 @@ com.vaadin.testbench.screenshot.directory=<enter the full path to the screenshots directory, parent of "references" directory> +; Deployment url to use for testing. Context path must be / +; com.vaadin.testbench.deployment.url=http://<enter your ip here>:8888/ + ; ; For only TestBench 3 ; @@ -29,9 +32,6 @@ com.vaadin.testbench.screenshot.directory=<enter the full path to the screenshot ; Location where TestBench 2 jar can be found com.vaadin.testbench.lib.dir=<enter location of testbench here> -; Deployment url to use for testing. Context path must be / -com.vaadin.testbench.deployment.url=http://<enter your ip here>:8888/ - ; Run the whole test even if a screenshot comparison fails com.vaadin.testbench.screenshot.softfail=true diff --git a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java index ff824ad98a..a4bb85bb53 100644 --- a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java +++ b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java @@ -49,6 +49,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test { private static final String RUN_LOCALLY_PROPERTY = "com.vaadin.testbench.runLocally"; private static final String HOSTNAME_PROPERTY = "com.vaadin.testbench.deployment.hostname"; private static final String PORT_PROPERTY = "com.vaadin.testbench.deployment.port"; + private static final String DEPLOYMENT_PROPERTY = "com.vaadin.testbench.deployment.url"; private static final Properties properties = new Properties(); private static final File propertiesFile = new File("work", "eclipse-run-selected-test.properties"); @@ -97,6 +98,15 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test { } @Override + protected String getBaseURL() { + String url = getProperty(DEPLOYMENT_PROPERTY); + if (url == null || url.trim().isEmpty()) { + return super.getBaseURL(); + } + return url; + } + + @Override protected String getDeploymentHostname() { if (getRunLocallyBrowser() != null) { return "localhost"; @@ -180,7 +190,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test { /* * (non-Javadoc) - * + * * @see com.vaadin.tests.tb3.AbstractTB3Test#setupLocalDriver() */ @Override |