tc.setTime((end - tc.getTime()) / 1000);
ts.setTime(ts.getTime() + tc.getTime());
error = true;
ts.setFailures(ts.getFailures() + 1);
Failure f = new Failure();
tc.getFailure().add(f);
f.setType(cause.getClass().getCanonicalName());
f.setMessage(cause.getMessage());
StringBuilder stack = new StringBuilder(cause.getMessage())
.append('\n');
for (StackTraceElement ste : cause.getStackTrace()) {
stack.append(ste.toString()).append('\n');
}
f.setContent(stack.toString());
printf("Failure of test %1$s because of %2$s%n",
context.getFullTestName(), cause.getMessage());
resumedFailure.append("\t").append(context.getLocalTestName())
.append(" of ").append(context.getSetName())
.append(" caused by ").append(cause.getMessage()).append("\n");