log.info("**********************测试报告开始**********************");
log.info(String.format("测试 结束,运行[%d] 成功[%d] 失败[%d] 忽略[%d] 持续%d毫秒",
total,succeedCount,failCount,ignoreCount,result.getRunTime()));
log.info("+失败的测试");
for(int i=0;i<result.getFailureCount();i++){
Failure failure = result.getFailures().get(i);
log.info(String.format("%d.%s 原因:%s",i+1,failure.getDescription(),failure.getMessage()));
String className = failure.getDescription().getClassName();
String methodName = failure.getDescription().getMethodName();
String traceLog = failure.getTrace();
log.info(String.format("\t%s %s",failure.getException(),getTraceFileLineDescription(traceLog,className+"."+methodName)));
}
log.info("**********************测试报告结束**********************");
}