cdalexndr · GitHub

Tests with without-library-and-huge-tests profile run for ~1h20m on a i5-3570 CPU without utilizing 100% CPU during tests, so there is room for improvement.

One such improvement is @HtmlUnitNYI with assertTitle, where test will not set the required title, but the assertTitle method will wait DEFAULT_WAIT_TIME for title (useless wait):

protected void assertTitle(final WebDriver webdriver, final String expected) throws Exception {
final long maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME;
while (true) {
try {
assertEquals(expected, webdriver.getTitle());
return;
}
catch (final ComparisonFailure e) {
if (System.currentTimeMillis() > maxWait) {
throw e;
}
Thread.sleep(10);
}
}
}

Another possible source of idling is waiting for async alerts. I think a synchronous javascript computation approach would be better then running async and waiting for alerts.

Also, what about parallel tests?

Read the original on github.com ↗