aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java')
-rw-r--r--uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
index d0134a4feb..dce725b7c0 100644
--- a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
+++ b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
@@ -25,9 +25,11 @@ import java.net.SocketException;
import java.util.Enumeration;
import java.util.Properties;
+import org.junit.Assert;
import org.openqa.selenium.remote.DesiredCapabilities;
import com.vaadin.testbench.annotations.BrowserFactory;
+import com.vaadin.testbench.annotations.RunLocally;
import com.vaadin.testbench.annotations.RunOnHub;
import com.vaadin.testbench.parallel.Browser;
@@ -45,8 +47,9 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
*
*/
public static final String SCREENSHOT_DIRECTORY = "com.vaadin.testbench.screenshot.directory";
- 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 RUN_LOCALLY_PROPERTY = "com.vaadin.testbench.runLocally";
+ private static final String ALLOW_RUN_LOCALLY_PROPERTY = "com.vaadin.testbench.allowRunLocally";
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 String HUB_URL = "com.vaadin.testbench.hub.url";
@@ -77,6 +80,18 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
}
}
+ @Override
+ public void setup() throws Exception {
+ String allowRunLocally = getProperty(ALLOW_RUN_LOCALLY_PROPERTY);
+ if ((allowRunLocally == null || !allowRunLocally.equals("" + true))
+ && getClass().getAnnotation(RunLocally.class) != null) {
+ Assert.fail("@RunLocally annotation is not allowed by default in framework tests. "
+ + "See file uitest/eclipse-run-selected-test.properties for more information.");
+ }
+
+ super.setup();
+ }
+
private static DesiredCapabilities getRunLocallyCapabilities() {
Browser localBrowser;
try {