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.
} else {
capabilities = getDesiredCapabilities();
- if (System.getProperty("useLocalWebDriver") != null) {
+ if (localWebDriverIsUsed()) {
setupLocalDriver(capabilities);
} else {
WebDriver dr = TestBench.createDriver(new RemoteWebDriver(
private static final ExecutorService service;
static {
- if (System.getProperty("useLocalWebDriver") != null) {
+ if (localWebDriverIsUsed()) {
MAX_CONCURRENT_TESTS = 10;
} else {
MAX_CONCURRENT_TESTS = 50;
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));
<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" />
<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>