System.out.printf("Run %d , Fail %d , Error %d \n", result.runCount(), result.failureCount(), result.errorCount());
if (result.failureCount() > 0) {
Enumeration<TestFailure> enu = result.failures();
while (enu.hasMoreElements()) {
TestFailure testFailure = (TestFailure) enu.nextElement();
System.out.println("--Fail------------------------------------------------");
System.out.println(testFailure.trace());
testFailure.thrownException().printStackTrace(System.out);
}
}
if (result.errorCount() > 0) {
Enumeration<TestFailure> enu = result.errors();
while (enu.hasMoreElements()) {
TestFailure testFailure = (TestFailure) enu.nextElement();
System.out.println("--ERROR------------------------------------------------");
System.out.println(testFailure.trace());
testFailure.thrownException().printStackTrace(System.out);
}
}
}