return max;
}
public void onTestComplete(TestResult testResult) {
String browser = testResult.getBrowserInfo().toString();
TestRunResult runData = currentRunData(browser);
TestResult.Result result = testResult.getResult();
String log = testResult.getLog();
runData.addTime(testResult.getTime());
if (result == TestResult.Result.passed) {
if (!verbose) {
out.print('.');
if (log.length() > 0) {
runData.addProblem(new TestResultProblem(testResult));
}
} else {
printInProgress(browser, "[PASSED] ", testResult, log);
}
runData.addPass();
totalPasses.incrementAndGet();
} else if (result == TestResult.Result.failed) {
if (!verbose) {
out.print('F');
} else {
printInProgress(browser, "[FAILED] ", testResult, log);
}
runData.addFail();
runData.addProblem(new TestResultProblem(testResult));
totalFails.incrementAndGet();
} else if (result == TestResult.Result.error) {
if (!verbose) {
out.print('E');
} else {
printInProgress(browser, "[ERROR] ", testResult, log);
}
runData.addError();
runData.addProblem(new TestResultProblem(testResult));
totalErrors.incrementAndGet();
} else {
out.print("<" + result + ">");
if (verbose) {
out.println(" " + testResult.getTestCaseName() + "." + testResult.getTestName());
if (log.length() > 0) {
String[] logLines = log.split("\n");
for (String line : logLines) {
out.println(" " + line);
}
}
}
runData.addProblem(new TestResultProblem(testResult));
}
if (lineColumn.incrementAndGet() == lineLength) {
out.println();
lineColumn.set(0);
}