summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tb3/TB3Runner.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2014-07-22 10:24:57 +0300
committerLeif Åstrand <leif@vaadin.com>2014-07-22 12:29:59 +0300
commit6ae7843e46ee906adfc99bde71ded5f296caea74 (patch)
treeba15e019a724fd3c70c83c34c4f7c0bac22a4f42 /uitest/src/com/vaadin/tests/tb3/TB3Runner.java
parent1b218a1f9f4713d23b8563acd6257fb912afcc15 (diff)
downloadvaadin-framework-6ae7843e46ee906adfc99bde71ded5f296caea74.tar.gz
vaadin-framework-6ae7843e46ee906adfc99bde71ded5f296caea74.zip
Simulate @RunLocally using eclipse-run-selected-test.properties (#14272)
Change-Id: I4eb9409629f64c17f39b1560062e763270f1f582
Diffstat (limited to 'uitest/src/com/vaadin/tests/tb3/TB3Runner.java')
-rw-r--r--uitest/src/com/vaadin/tests/tb3/TB3Runner.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/TB3Runner.java b/uitest/src/com/vaadin/tests/tb3/TB3Runner.java
index 4d29e479e2..5b5a6dcf39 100644
--- a/uitest/src/com/vaadin/tests/tb3/TB3Runner.java
+++ b/uitest/src/com/vaadin/tests/tb3/TB3Runner.java
@@ -37,7 +37,7 @@ import org.openqa.selenium.remote.DesiredCapabilities;
import com.vaadin.tests.annotations.TestCategory;
import com.vaadin.tests.tb3.AbstractTB3Test.BrowserUtil;
-import com.vaadin.tests.tb3.AbstractTB3Test.RunLocally;
+import com.vaadin.tests.tb3.MultiBrowserTest.Browser;
/**
* This runner is loosely based on FactoryTestRunner by Ted Young
@@ -185,17 +185,17 @@ public class TB3Runner extends BlockJUnit4ClassRunner {
/*
* Returns a list of desired browser capabilities according to browsers
* defined in the test class, filtered by possible filter parameters. Use
- * {@code @RunLocally} annotation to override all capabilities.
+ * {@code @RunLocally} annotation or com.vaadin.testbench.runLocally
+ * property to override all capabilities.
*/
private Collection<DesiredCapabilities> getDesiredCapabilities(
AbstractTB3Test testClassInstance) {
Collection<DesiredCapabilities> desiredCapabilites = getFilteredCapabilities(testClassInstance);
- if (isRunLocally(testClassInstance)) {
+ Browser runLocallyBrowser = testClassInstance.getRunLocallyBrowser();
+ if (runLocallyBrowser != null) {
desiredCapabilites = new ArrayList<DesiredCapabilities>();
- desiredCapabilites.add(testClassInstance.getClass()
- .getAnnotation(RunLocally.class).value()
- .getDesiredCapabilities());
+ desiredCapabilites.add(runLocallyBrowser.getDesiredCapabilities());
}
return desiredCapabilites;
@@ -237,10 +237,6 @@ public class TB3Runner extends BlockJUnit4ClassRunner {
return filteredCapabilities;
}
- private boolean isRunLocally(AbstractTB3Test testClassInstance) {
- return testClassInstance.getClass().getAnnotation(RunLocally.class) != null;
- }
-
private AbstractTB3Test getTestClassInstance()
throws InstantiationException, IllegalAccessException,
InvocationTargetException {