String setName = context.getSetName()
+ (context.getParameterName() == null ? "" : context
.getParameterName());
long end = System.currentTimeMillis();
Testsuite ts = result.get(setName);
Testcase tc = resultcase.get(setName).get(context.getFullTestName());
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());
StringBuffer stack = new StringBuffer(cause.getMessage()).append('\n');
for (StackTraceElement ste : cause.getStackTrace()) {
stack.append(ste.toString()).append('\n');