summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java4
-rw-r--r--uitest/src/com/vaadin/tests/tb3/TB3Runner.java8
-rw-r--r--uitest/tb3test.xml2
3 files changed, 12 insertions, 2 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
index 3745d60fd8..c8e4e3c9a9 100644
--- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
+++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
@@ -51,6 +51,8 @@ import com.vaadin.tests.components.AbstractTestUIWithLog;
import com.vaadin.tests.tb3.MultiBrowserTest.Browser;
import com.vaadin.ui.UI;
+import static com.vaadin.tests.tb3.TB3Runner.localWebDriverIsUsed;
+
/**
* Base class for TestBench 3+ tests. All TB3+ tests in the project should
* extend this class.
@@ -126,7 +128,7 @@ public abstract class AbstractTB3Test extends TestBenchTestCase {
} else {
capabilities = getDesiredCapabilities();
- if (System.getProperty("useLocalWebDriver") != null) {
+ if (localWebDriverIsUsed()) {
setupLocalDriver(capabilities);
} else {
WebDriver dr = TestBench.createDriver(new RemoteWebDriver(
diff --git a/uitest/src/com/vaadin/tests/tb3/TB3Runner.java b/uitest/src/com/vaadin/tests/tb3/TB3Runner.java
index 69880008ff..4d29e479e2 100644
--- a/uitest/src/com/vaadin/tests/tb3/TB3Runner.java
+++ b/uitest/src/com/vaadin/tests/tb3/TB3Runner.java
@@ -61,7 +61,7 @@ public class TB3Runner extends BlockJUnit4ClassRunner {
private static final ExecutorService service;
static {
- if (System.getProperty("useLocalWebDriver") != null) {
+ if (localWebDriverIsUsed()) {
MAX_CONCURRENT_TESTS = 10;
} else {
MAX_CONCURRENT_TESTS = 50;
@@ -69,6 +69,12 @@ public class TB3Runner extends BlockJUnit4ClassRunner {
service = Executors.newFixedThreadPool(MAX_CONCURRENT_TESTS);
}
+ protected static boolean localWebDriverIsUsed() {
+ String useLocalWebDriver = System.getProperty("useLocalWebDriver");
+
+ return useLocalWebDriver != null && useLocalWebDriver.toLowerCase().equals("true");
+ }
+
public TB3Runner(Class<?> klass) throws InitializationError {
super(klass);
setScheduler(new ParallelScheduler(service));
diff --git a/uitest/tb3test.xml b/uitest/tb3test.xml
index 6e0f25a8f7..a39725f1bb 100644
--- a/uitest/tb3test.xml
+++ b/uitest/tb3test.xml
@@ -7,6 +7,7 @@
<property name="browsers.exclude" value="" />
<property name="categories.include" value="" />
<property name="categories.exclude" value="" />
+ <property name="useLocalWebDriver" value="false" />
<ivy:resolve file="${tb3test.dir}/ivy.xml" conf="build, build-provided" />
<ivy:cachepath pathid="classpath.tb3.lib" conf="build, build-provided" />
@@ -37,6 +38,7 @@
<jvmarg value="-Dbrowsers.exclude=${browsers.exclude}" />
<jvmarg value="-Dcategories.include=${categories.include}" />
<jvmarg value="-Dcategories.exclude=${categories.exclude}" />
+ <jvmarg value="-DuseLocalWebDriver=${useLocalWebDriver}" />
<test name="${junit.test.suite}" todir="${report.dir}" />
</junit>