boolean failed = false;
SeleniumTestRCRunner runner = new SeleniumTestRCRunner(host, port, browserType, appHost);
runner.prepare();
try {
for (File testFile : testsFiles) {
SeleniumTest test = null;
try {
SeleniumCompositeTestFilter testFilter = new SeleniumCompositeTestFilter();
File[] searchPaths = {testFile.getAbsoluteFile().getParentFile(), testsRoot.getAbsoluteFile()};
testFilter.addTestFilter(new SeleniumIncludeTestFilter(new NSArray<File>(searchPaths)));
testFilter.addTestFilter(new SeleniumRepeatExpanderTestFilter());
testFilter.addTestFilter(new SeleniumOverrideOpenTestFilter(appHost));
test = new SeleniumTestFileProcessor(testFile, testFilter).process();
log.debug("running: " + testFile);
runner.run(test);
log.info(String.format("test '%s' PASSED", testFile));
log.info("");
} catch (SeleniumTestFailureException e) {
failed = true;
log.error(String.format("test '%s' FAILED: %s", testFile, e));
log.error("test log:");
int curCommand = 0;
for (SeleniumTest.Element elem: test.elements()) {
if (elem instanceof SeleniumTest.Command) {
if (curCommand++ > e.processedCommands()) {
break;
}
SeleniumTest.Command command = (SeleniumTest.Command)elem;