]> source.dussan.org Git - vaadin-framework.git/commitdiff
Use deployment url property value for base URL if it's defined (#14758).
authorDenis Anisimov <denis@vaadin.com>
Wed, 24 Sep 2014 17:42:54 +0000 (20:42 +0300)
committerSauli Tähkäpää <sauli@vaadin.com>
Wed, 29 Oct 2014 06:56:54 +0000 (08:56 +0200)
Change-Id: I249e37cfaf23564b00136b33132df3d339a46e98

uitest/eclipse-run-selected-test.properties
uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java

index 70010fd1da543d7b0080fa51f95b97361cc134b5..f8fb0a8c14c30f84d981a49d21a890c36ff4875b 100644 (file)
@@ -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
 
index ff824ad98a3302b5df090865ec99273a72645aa5..a4bb85bb534b44970b87cfed0ab6ddf8d492d25c 100644 (file)
@@ -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");
@@ -96,6 +97,15 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
         return "tb3-hub.intra.itmill.com";
     }
 
+    @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) {
@@ -180,7 +190,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
 
     /*
      * (non-Javadoc)
-     *
+     * 
      * @see com.vaadin.tests.tb3.AbstractTB3Test#setupLocalDriver()
      */
     @Override